Fix/posix sleep (#3705)

* fix(Thread_POSIX): sleep() poor performance #3703

* chore(vscode): add file associations

* fix(TaskManager): waits for all threads in the ThreadPool #3704

* fix(Thread): call std::this_thread::sleep_for() to sleep #3703

* fix(PollSet): wakeup fd is never read #3708

* feat(Thread): Add Thread::set/getAffinity() #3709

* doc(Thread): Thread::trySleep() assertion #3710

* fix(PollSet): wakeup fd is never read (windows portion and some other optimizations) #3708

* feat(SocketReactor): improvements #3713

* chore(ThreadTest): add missing include

* fix(PollSet): wakeup fd is never read #3708

* fix(Any): #3682 #3683 #3692 #3712

* fix(mingw): lowercase winsock2 and iphlpapi to allow cross compile #3711

* feat(Thread): Add Thread::set/getAffinity() #3709

* chore(SocketReactor): one-liners inlined, removed redundant try/catch in dospatch, remove unused onBusy()

* feat(SocketReactor): add socket to ErrorNotification

* fix(SocketReactor): pollTimeout assignment and ConnectorTest leak
This commit is contained in:
Aleksandar Fabijanic
2022-07-26 13:54:56 +02:00
committed by GitHub
parent d1b398ddc6
commit 86a4f0045e
26 changed files with 560 additions and 277 deletions

View File

@@ -80,11 +80,12 @@ public:
void joinImpl();
bool joinImpl(long milliseconds);
bool isRunningImpl() const;
static void sleepImpl(long milliseconds);
static void yieldImpl();
static ThreadImpl* currentImpl();
static TIDImpl currentTidImpl();
static long currentOsTidImpl();
bool setAffinityImpl(int coreID);
int getAffinityImpl() const;
protected:
static void* runnableEntry(void* pThread);
@@ -146,6 +147,7 @@ private:
bool started;
bool joined;
std::string name;
int affinity;
mutable FastMutex mutex;
};