mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-10 16:19:23 +00:00
* Created ThreadBase holding poll manager, etc, and added a this_thread global object.
* Cleaned up main initialization, SCGI and polling code. * Fixed a bug that would cause reading of a piece to hang if the incoming data contains only data up to the file boundary, but not the next file's data. The bug did not trigger if the file boundary and piece boundaries were the same. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1101 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -40,11 +40,20 @@
|
||||
#include <rak/timer.h>
|
||||
#include <rak/priority_queue_default.h>
|
||||
|
||||
#include "utils/thread_base.h"
|
||||
|
||||
class Control;
|
||||
|
||||
// The cachedTime timer should only be updated by the main thread to
|
||||
// avoid potential problems in timing calculations. Code really should
|
||||
// be reviewed and fixed in order to avoid any potential problems, and
|
||||
// then made updates properly sync'ed with memory barriers.
|
||||
|
||||
extern rak::priority_queue_default taskScheduler;
|
||||
extern rak::timer cachedTime;
|
||||
|
||||
extern Control* control;
|
||||
// extern __thread utils::ThreadBase* this_thread; // Only use for worker threads for now.
|
||||
extern utils::ThreadBase* this_thread; // Only use for main threads for now.
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user