{"shas":[["3fbe98e6b9e2adb7fa5bf72b420a1b7fd2f79174","38a13e8686d531670f4f2103a323cfd6df73c583@gmail.com","doco","Phil Smith"],["9801ff5a395bd7adb1f181d65283de97e2e4fa53","38a13e8686d531670f4f2103a323cfd6df73c583@gmail.com","Have Worker::start, which implies Worker::run as well as some supporting members.","Phil Smith"],["4d70ab7a1876d48991dfb39a0e5297f0eb6b0d79","38a13e8686d531670f4f2103a323cfd6df73c583@gmail.com","tweak","Phil Smith"],["b537e4b45ceb59bebba3ca848a80262ce4e06edc","38a13e8686d531670f4f2103a323cfd6df73c583@gmail.com","Add pthread_cancel to the interface, fix a fat finger on pthread_exit's return type.","Phil Smith"],["ff53aa34911a2d782e40098db8be54fcf56e627c","38a13e8686d531670f4f2103a323cfd6df73c583@gmail.com","Worker is templated now, and belongs wholly in headers.","Phil Smith"],["4be695e1a81105a3ab24f0b4a8717b476e8b940d","38a13e8686d531670f4f2103a323cfd6df73c583@gmail.com","Expose pthread_cleanup_push and pop.\n\nWe'll use them as a race-condition-proofed way to track whether the worker thread is running or not.","Phil Smith"],["20d4ab27109243b3ab11e4748b7427589c9a313a","38a13e8686d531670f4f2103a323cfd6df73c583@gmail.com","And pthread_mutex_trylock.","Phil Smith"],["31b45f0c760c5315e6d5856dce45ccc289720625","38a13e8686d531670f4f2103a323cfd6df73c583@gmail.com","Going to want a mutex.\n\nWe'll enforce one thread per worker by having the worker thread lock an associated mutex for its lifetime.  It will be released in a cleanup handler and acquired with trylock (on failure the thread is known to be a duplicate and will exit.)","Phil Smith"],["4976c39cc4c4f22b3d862c1d166649159d3d4c0f","38a13e8686d531670f4f2103a323cfd6df73c583@gmail.com","Ah, I've misunderstood the meaning of pthread_cleanup_push/pop.\n\nThey are not used to manipulate arbitrary callbacks in the event of thread cancellation, they really only deal with cleaning up long-lived lexical scopes.  As such linux provides them as paired macros, which the spec guarantees it can do.  Individual delegate functions therefore fail to compile.\n\nIn the end a long-lived lexical scope is exactly what I have, so we may still use them.  I just need to dream up an alternate way to mock them (how do you mock a macro?)","Phil Smith"]],"repo":"dirt/dirt","actor":"phs","ref":"refs/heads/master","size":9,"head":"4976c39cc4c4f22b3d862c1d166649159d3d4c0f","actor_gravatar":"f057f53afd6fffc5075d8d59277cd103","push_id":27834469}