summaryrefslogtreecommitdiff
path: root/doc/bugs/get_-J___34__fails__34___to_get_files_with_the_same_key/comment_6_5f2ed95bcad2e3d1c4260d1fb0440052._comment
blob: 32f2d4decc769722b2e81404e7d8df9d409d9a7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[[!comment format=mdwn
 username="joey"
 subject="""comment 6"""
 date="2017-10-17T17:21:27Z"
 content="""
Another way to approach the problem would be, when the transfer of
the same key is already in progress by another thread of the same process, 
wait for that thread to complete before running the requested transfer
action.

The assistant has a TransferMap of all transfers the process is running.
That would need to be moved from the DaemonStatus to Annex state.

To wait on the thread that's doing the transfer, would need to store
a MVar or something in the TransferInfo; the ThreadId can't be waited on
by itself.

This seems much less intrusive, and just as fast as my initial approach.
"""]]