~satchmo

https://ket.so

Sugar Content.

Trackers

~satchmo/libvmm

Last active 4 years ago

~satchmo/ket

Last active 4 years ago

#5 Race condition causing indefinite queue hangs 4 years ago

on ~sircmpwn/dowork

REPORTED RESOLVED FIXED

#5 Race condition causing indefinite queue hangs 4 years ago

Ticket created by ~satchmo on ~sircmpwn/dowork

#Issue

If Queue::Shutdown() sends nil into q.shutdown before the goroutine in Queue::Start() creates the channel, the send will block indefinitely as q.shutdown would still be a nil channel.

#Reproduction

Running the following a few times should reproduce the issue.

package main

import (
	"context"
	"git.sr.ht/~sircmpwn/dowork"
)

func main() {
	task := work.NewTask(func(ctx context.Context) error {
		return nil
	})

	work.Enqueue(task)
	work.Shutdown()
}

#57 Should Address suppress copying? 4 years ago

on ~satchmo/libvmm

REPORTED RESOLVED INVALID

#57 Should Address suppress copying? 4 years ago

Comment by ~satchmo on ~satchmo/libvmm

Can't slice Address if ya can't create one in the first place big brain.

#56 Default copy/move methods for Address 4 years ago

on ~satchmo/libvmm

REPORTED RESOLVED IMPLEMENTED

#63 Prefer ++i over i++ where correct 4 years ago

Ticket created by ~satchmo on ~satchmo/libvmm

It avoids requiring a copy of the object to be made.

#62 Replace copies and reassinments with ternary/lambdas 4 years ago

Ticket created by ~satchmo on ~satchmo/libvmm

Something like this:

const std::string somevalue = [&](){
    if (caseA) {
        return "Value A";
    } else if (caseB) {
        return "Value B";
    } else {
        return "Value C";
    }
}();

#61 Replace macros 4 years ago

Ticket created by ~satchmo on ~satchmo/libvmm

Either use enums or classes:

namespace vmm::kvm {

enum class Constants {
    MAX_MSRS{...}
};

struct Constants {
    static constexpr auto MAX_MSRS = ...;
};

}

#60 Use unique_ptr for FAM structs 4 years ago

Ticket created by ~satchmo on ~satchmo/libvmm

#58 Use brace initialization for members 4 years ago

Ticket created by ~satchmo on ~satchmo/libvmm