Permalink
Browse files

core, feat: support async locker in state machine.

  • Loading branch information...
xicilion committed Oct 22, 2017
1 parent 51e8870 commit 6147c17aafb544fc2aff369ca2ee0791efe1499a
Showing with 16 additions and 0 deletions.
  1. +16 −0 fibjs/include/AsyncCall.h
View
@@ -255,6 +255,22 @@ class AsyncState : public AsyncEvent {
return m_ac->isolate();
}
public:
virtual void resume()
{
apost(0);
}
result_t lock(exlib::Locker& l)
{
return l.lock(this) ? 0 : CALL_E_PENDDING;
}
void unlock(exlib::Locker& l)
{
l.unlock(this);
}
private:
AsyncEvent* m_ac;
bool m_bAsyncState;

0 comments on commit 6147c17

Please sign in to comment.