Commit Graph

3 Commits

Author SHA1 Message Date
Martchus c404a092cc Add async locks
This might be useful to avoid blocking threads in the thread pool just for
waiting on a global lock. It might also be useful to allow stopping build
actions while they're waiting for a lock.
2022-12-04 00:28:47 +01:00
Martchus 4416922397 Fix clearing locks 2021-03-02 18:30:15 +01:00
Martchus f147dc3179 Fix locks for global resources by implementing a mutex not tied to a thread
* Can not use a normal mutex because we don't want to tie the resources to
  a specific thread (and instead e.g. to a build action which might not be
  executed by a single thread)
* A semaphore would do that but libstdc++ only supports it as of GCC 11 and
  besides it wouldn't distinguish between shared and exclusive locking
2021-02-26 01:39:21 +01:00