mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-09 11:42:33 +00:00
* Finished the foundation of threading.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1114 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
#include <torrent/torrent.h>
|
||||
|
||||
#include "poll_manager_kqueue.h"
|
||||
#include "thread_base.h"
|
||||
|
||||
namespace core {
|
||||
|
||||
@@ -68,7 +69,11 @@ PollManagerKQueue::poll(rak::timer timeout) {
|
||||
torrent::perform();
|
||||
timeout = std::min(timeout, rak::timer(torrent::next_timeout())) + 1000;
|
||||
|
||||
if (static_cast<torrent::PollKQueue*>(m_poll)->poll((timeout.usec() + 999) / 1000) == -1)
|
||||
ThreadBase::release_global_lock();
|
||||
int status = static_cast<torrent::PollKQueue*>(m_poll)->poll((timeout.usec() + 999) / 1000);
|
||||
ThreadBase::acquire_global_lock();
|
||||
|
||||
if (status == -1)
|
||||
return check_error();
|
||||
|
||||
torrent::perform();
|
||||
|
||||
Reference in New Issue
Block a user