← Back to team overview

linuxdcpp-team team mailing list archive

[Bug 1194299] Re: Threading issues in hub management

 

Adding the async call probably caused another threading issue. Since the
client is destroyed from the GUI thread, the async funtion may be
executed for the deleted object because it doesn't go through the
listener like the other calls from BufferedSocket. AirDC++ has been
modified to pass the deletion function to the socket with the shutdown
call as lambda (it might be more simple to pass that as void* though).

-- 
You received this bug notification because you are a member of
Dcplusplus-team, which is subscribed to DC++.
https://bugs.launchpad.net/bugs/1194299

Title:
  Threading issues in hub management

Status in DC++:
  Fix Committed

Bug description:
  AdcHub::info is called from various different threads (timer, refresh,
  hub, GUI) but it's not thread safe. lastInfoMap is unprotected while
  it can be modified from different threads simultaneously. This has
  been fixed in AirDC++ by syncing the info calls from other threads to
  the hub thread.

  Client::updateCounts is another function that shouldn't be called from
  different threads because the hub counts may go wrong. This started to
  cause real problems in AirDC++ when the info calls from TimerManager
  were synced to the hub threads, which caused them to get executed
  asynchronously all the time.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dcplusplus/+bug/1194299/+subscriptions


References