예제 #1
0
파일: Fiber.cpp 프로젝트: Mirwangsir/fibjs
void FiberBase::start()
{
    m_caller = JSFiber::current();

    if (m_caller)
    {
        v8::Local<v8::Object> co = m_caller->wrap();
        v8::Local<v8::Object> o = wrap();

        v8::Local<v8::Array> ks = co->GetOwnPropertyNames();
        int len = ks->Length();

        int i;

        for (i = 0; i < len; i++)
        {
            v8::Local<v8::Value> k = ks->Get(i);
            o->Set(k, co->Get(k));
        }
    }

    g_jobs.put(this);
    Ref();
}
예제 #2
0
파일: Fiber.cpp 프로젝트: ror/fibjs
void AsyncEvent::sync()
{
    g_jobs.put(this);
}
예제 #3
0
파일: Fiber.cpp 프로젝트: ror/fibjs
void FiberBase::start()
{
    set_caller(JSFiber::current());
    g_jobs.put(this);
    Ref();
}
예제 #4
0
파일: Fiber.cpp 프로젝트: Mirwangsir/fibjs
void asyncCallBack::callback()
{
    g_jobs.put(this);
}