Closed alt-graph closed 8 months ago
Maybe we want to change this to the number one then, to try to avoid referencing something that is not correct?
Maybe we want to change this to the number one then, to try to avoid referencing something that is not correct?
There is no possibility of referencing something that is not correct because we have no pointer to a ThreadPool
at all, hence we cannot ask it about the wrong ID. Without a ThreadPool
, the integer ID is meaningless.
Yes I just noticed that after setting up a test that calls TaskHandle{}.cancel();
Merge away ;)
Without a default constructor, it is almost impossible to store a
TaskHandle
in some user-defined data structure. This limits its usefulness dramatically. Hence, this PR adds a simple default constructor and a test to check that the default-constructed task handle does what one would expect (namely, nothing useful).