diff options
author | 2012-07-18 19:13:56 -0400 | |
---|---|---|
committer | 2012-07-18 19:15:34 -0400 | |
commit | cf47bb3f509ae63ad868b66c0b6f2baecb93e4c7 (patch) | |
tree | 60bfdab5cf877c4de206146c65e759f82cdf2e85 /Assistant/Threads/Transferrer.hs | |
parent | eea0a3616cd1cbaf033649c11a5c2b650b6b632f (diff) |
run file transfers in threads, not processes
This should fix OSX/BSD issues with not noticing transfer information
files with kqueue. Now that threads are used, the thread can manage the
transfer slot allocation and deallocation by itself; much cleaner.
Diffstat (limited to 'Assistant/Threads/Transferrer.hs')
-rw-r--r-- | Assistant/Threads/Transferrer.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Assistant/Threads/Transferrer.hs b/Assistant/Threads/Transferrer.hs index dd63d4d12..c439d8b7e 100644 --- a/Assistant/Threads/Transferrer.hs +++ b/Assistant/Threads/Transferrer.hs @@ -74,9 +74,8 @@ runTransfer st dstatus slots t info = case (transferRemote info, associatedFile (Nothing, _) -> noop (_, Nothing) -> noop (Just remote, Just file) -> do - tid <- inTransferSlot slots $ - unsafeForkIOThreadState st $ - transferprocess remote file + tid <- inTransferSlot slots st $ + transferprocess remote file now <- getCurrentTime runThreadState st $ adjustTransfers dstatus $ M.insertWith' const t info |