Пример #1
0
void AsioExtension::initConditionWaitHandle() {
  HHVM_STATIC_MALIAS(HH\\ConditionWaitHandle, create,
                     ConditionWaitHandle, create);
  HHVM_STATIC_MALIAS(HH\\ConditionWaitHandle, setOnCreateCallback,
                     ConditionWaitHandle, setOnCreateCallback);
  HHVM_MALIAS(HH\\ConditionWaitHandle, succeed, ConditionWaitHandle, succeed);
  HHVM_MALIAS(HH\\ConditionWaitHandle, fail, ConditionWaitHandle, fail);
}
Пример #2
0
void AsioExtension::initRescheduleWaitHandle() {
  HHVM_STATIC_MALIAS(HH\\RescheduleWaitHandle, create,
                     RescheduleWaitHandle, create);

  HHVM_RCC_INT(HH_RescheduleWaitHandle, QUEUE_DEFAULT,
               AsioContext::QUEUE_DEFAULT);
  HHVM_RCC_INT(HH_RescheduleWaitHandle, QUEUE_NO_PENDING_IO,
               AsioContext::QUEUE_NO_PENDING_IO);
}
Пример #3
0
void AsioExtension::initAwaitAllWaitHandle() {
#define AAWH_SME(meth) \
  HHVM_STATIC_MALIAS(HH\\AwaitAllWaitHandle, meth, AwaitAllWaitHandle, meth)
  AAWH_SME(fromArray);
  AAWH_SME(fromVec);
  AAWH_SME(fromDict);
  AAWH_SME(fromMap);
  AAWH_SME(fromVector);
  AAWH_SME(setOnCreateCallback);
#undef AAWH_SME
  HHVM_STATIC_MALIAS(HH\\AwaitAllWaitHandle, fromDArray, AwaitAllWaitHandle, fromArray);
}
Пример #4
0
void AsioExtension::initRescheduleWaitHandle() {
  HHVM_STATIC_MALIAS(HH\\RescheduleWaitHandle, create,
                     RescheduleWaitHandle, create);

  Native::registerClassConstant<KindOfInt64>(
    s_HH_RescheduleWaitHandle.get(),
    s_QUEUE_DEFAULT.get(),
    AsioContext::QUEUE_DEFAULT
  );

  Native::registerClassConstant<KindOfInt64>(
    s_HH_RescheduleWaitHandle.get(),
    s_QUEUE_NO_PENDING_IO.get(),
    AsioContext::QUEUE_NO_PENDING_IO
  );
}