git-annex/Types
Joey Hess 37d505dd6b
avoid STM deadlock
When all worker threads are running and enteringStage is called,
it waits for an idle slot. If all off the other threads then call it in
turn, a deadlock occurrs.

This is the same problem I didn't actually fix in
5a9842d7ed.

Fixed by doing two separate STM transactions, the first replaces its
active thread with an idle thread, and the second waits for another idle
thread. That guarantees there will eventually be an idle thread to find.

The changes to WorkerPool were necessary because it can't add an idle
thread containing the Annex state and go on to run an action using that
same state, so I had to remove the Annex state from IdleWorker.
2019-06-19 18:15:25 -04:00
..
ActionItem.hs finish CommandStart transition 2019-06-12 13:24:01 -04:00
AdjustedBranch.hs refactor getCurrentBranch 2018-10-19 17:29:18 -04:00
Availability.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Backend.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Benchmark.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
BranchState.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
CleanupActions.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Command.hs make WorkerStage an open type 2019-06-19 13:05:03 -04:00
Concurrency.hs run download checksum verification in separate job pool 2019-06-17 14:58:02 -04:00
Creds.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Crypto.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
DeferredParse.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
DesktopNotify.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Difference.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Distribution.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Export.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
FileMatcher.hs honor preferred content when importing 2019-05-21 14:38:06 -04:00
GitConfig.hs rename annex.security.allowed-http-addresses 2019-05-30 12:43:40 -04:00
Group.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Import.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Key.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
KeySource.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
LockCache.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Messages.hs get rid of implicitMessages state 2019-06-12 14:01:41 -04:00
MetaData.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Mime.hs Added mimeencoding= term to annex.largefiles expressions. 2019-04-30 12:17:22 -04:00
NumCopies.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
RefSpec.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Remote.hs clarify 2019-06-04 21:49:53 -04:00
RepoVersion.hs v7 2018-10-25 18:24:23 -04:00
ScheduledActivity.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
StandardGroups.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
StoreRetrieve.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Test.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Transfer.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
TrustLevel.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
UrlContents.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
UUID.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
View.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
WorkerPool.hs avoid STM deadlock 2019-06-19 18:15:25 -04:00