[...] cont
This commit is contained in:
parent
9436b12455
commit
ea83fcef20
@ -586,6 +586,6 @@ namespace Aurora::Async
|
||||
|
||||
virtual bool Poll(bool block) = 0;
|
||||
|
||||
virtual void AddLoopSource(const AuSPtr<Loop::ILoopSource> &loopSource, WorkerId_t workerId, AuUInt32 timeout, const AuConsumer<AuSPtr<Loop::ILoopSource>, bool> &callback) = 0;
|
||||
virtual bool AddLoopSource(const AuSPtr<Loop::ILoopSource> &loopSource, WorkerId_t workerId, AuUInt32 timeout, const AuConsumer<AuSPtr<Loop::ILoopSource>, bool> &callback) = 0;
|
||||
};
|
||||
}
|
@ -353,7 +353,7 @@ namespace Aurora::Async
|
||||
state->loopSources.clear();
|
||||
state->loopSources.reserve(curLoopReq.size());
|
||||
|
||||
if (AuTryFind(nextLoopSources, group->eventLs))
|
||||
if (std::find(nextLoopSources.begin(), nextLoopSources.end(), group->eventLs) != nextLoopSources.end())
|
||||
{
|
||||
PollInternal(false);
|
||||
}
|
||||
@ -362,8 +362,8 @@ namespace Aurora::Async
|
||||
{
|
||||
bool remove {};
|
||||
bool removeType {};
|
||||
|
||||
if (AuTryFind(nextLoopSources, request.loopSource))
|
||||
|
||||
if (std::find(nextLoopSources.begin(), nextLoopSources.end(), request.loopSource) != nextLoopSources.end())
|
||||
{
|
||||
remove = true;
|
||||
removeType = true;
|
||||
|
@ -52,14 +52,17 @@ namespace Aurora::Async
|
||||
void AssertWorker(WorkerId_t id) override;
|
||||
|
||||
void Run(WorkerId_t target, AuSPtr<IAsyncRunnable> runnable);
|
||||
|
||||
|
||||
bool Poll(bool block) override;
|
||||
bool PollInternal(bool block);
|
||||
bool PollLoopSource(bool block);
|
||||
|
||||
size_t GetThreadWorkersCount(ThreadGroup_t group);
|
||||
|
||||
bool CtxYield();
|
||||
int CfxPollPush();
|
||||
void CtxPollReturn(const AuSPtr<ThreadState> &state, int status, bool hitTask);
|
||||
bool AddLoopSource(const AuSPtr<Loop::ILoopSource> &loopSource, WorkerId_t workerId, AuUInt32 timeout, const AuConsumer<AuSPtr<Loop::ILoopSource>, bool> &callback) override;
|
||||
|
||||
private:
|
||||
AuSPtr<ThreadState> GetThreadHandle(WorkerId_t id);
|
||||
|
Loading…
Reference in New Issue
Block a user