Branch: refs/heads/master
  Home:   https://github.com/conformal/btcwallet
  Commit: 114bb581f711d42f57870fc3539f43ffa3b313b2
      
https://github.com/conformal/btcwallet/commit/114bb581f711d42f57870fc3539f43ffa3b313b2
  Author: Josh Rickmar <[email protected]>
  Date:   2014-02-05 (Wed, 05 Feb 2014)

  Changed paths:
    M acctmgr.go
    M disksync.go
    M rpcserver.go

  Log Message:
  -----------
  Fix hang related to account file writes.

The disk syncer now maintains its own countdown timer, creating a new
timer only when necessary (when there is no timer running, and
something is scheduled to be written).  When the timer expires, the
select loop begins selecting on a grab of the account manager's binary
semaphore, and if read, performs the sync and nils the select channel
to prevent a future grab until a new timer has expired.

Tested with a race-enabled build on Windows.  No lockups or races
related to the disk syncing experienced with constant client requests
and incoming btcd notifications, and scheduled writes run as expected
once the countdown timer expires, locking out all server request and
notifiation handling.


Reply via email to