这篇教程C++ uv_mutex_lock函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中uv_mutex_lock函数的典型用法代码示例。如果您正苦于以下问题:C++ uv_mutex_lock函数的具体用法?C++ uv_mutex_lock怎么用?C++ uv_mutex_lock使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了uv_mutex_lock函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: qsf_getenvconst char* qsf_getenv(const char* key, const char* value){ lua_State* L = global_env.L; assert(L && key); uv_mutex_lock(&global_env.mutex); lua_getglobal(L, key); const char* s = lua_tostring(L, -1); lua_pop(L, 1); uv_mutex_unlock(&global_env.mutex); return (s == NULL ? value : s);}
开发者ID:zhangjinde,项目名称:QSF,代码行数:11,
示例2: Mutex_func_lockstatic PyObject *Mutex_func_lock(Mutex *self){ RAISE_IF_NOT_INITIALIZED(self, NULL); Py_BEGIN_ALLOW_THREADS uv_mutex_lock(&self->uv_mutex); Py_END_ALLOW_THREADS Py_RETURN_NONE;}
开发者ID:JoneXiong,项目名称:pyuv,代码行数:11,
示例3: xcallocUI *ui_bridge_attach(UI *ui, ui_main_fn ui_main, event_scheduler scheduler){ UIBridgeData *rv = xcalloc(1, sizeof(UIBridgeData)); rv->ui = ui; rv->bridge.rgb = ui->rgb; rv->bridge.stop = ui_bridge_stop; rv->bridge.resize = ui_bridge_resize; rv->bridge.clear = ui_bridge_clear; rv->bridge.eol_clear = ui_bridge_eol_clear; rv->bridge.cursor_goto = ui_bridge_cursor_goto; rv->bridge.mode_info_set = ui_bridge_mode_info_set; rv->bridge.update_menu = ui_bridge_update_menu; rv->bridge.busy_start = ui_bridge_busy_start; rv->bridge.busy_stop = ui_bridge_busy_stop; rv->bridge.mouse_on = ui_bridge_mouse_on; rv->bridge.mouse_off = ui_bridge_mouse_off; rv->bridge.mode_change = ui_bridge_mode_change; rv->bridge.set_scroll_region = ui_bridge_set_scroll_region; rv->bridge.scroll = ui_bridge_scroll; rv->bridge.highlight_set = ui_bridge_highlight_set; rv->bridge.put = ui_bridge_put; rv->bridge.bell = ui_bridge_bell; rv->bridge.visual_bell = ui_bridge_visual_bell; rv->bridge.update_fg = ui_bridge_update_fg; rv->bridge.update_bg = ui_bridge_update_bg; rv->bridge.update_sp = ui_bridge_update_sp; rv->bridge.flush = ui_bridge_flush; rv->bridge.suspend = ui_bridge_suspend; rv->bridge.set_title = ui_bridge_set_title; rv->bridge.set_icon = ui_bridge_set_icon; rv->scheduler = scheduler; for (UIWidget i = 0; (int)i < UI_WIDGETS; i++) { rv->bridge.ui_ext[i] = ui->ui_ext[i]; } rv->ui_main = ui_main; uv_mutex_init(&rv->mutex); uv_cond_init(&rv->cond); uv_mutex_lock(&rv->mutex); rv->ready = false; if (uv_thread_create(&rv->ui_thread, ui_thread_run, rv)) { abort(); } while (!rv->ready) { uv_cond_wait(&rv->cond, &rv->mutex); } uv_mutex_unlock(&rv->mutex); ui_attach_impl(&rv->bridge); return &rv->bridge;}
开发者ID:hoop33,项目名称:neovim,代码行数:54,
示例4: pg_cache_wait_event/* * Returns page flags. * The lock will be released and re-acquired. The descriptor is not guaranteed * to exist after this function returns. */unsigned long pg_cache_wait_event(struct rrdeng_page_cache_descr *descr){ unsigned long flags; uv_mutex_lock(&descr->mutex); pg_cache_wait_event_unsafe(descr); flags = descr->flags; uv_mutex_unlock(&descr->mutex); return flags;}
开发者ID:firehol,项目名称:netdata,代码行数:16,
示例5: worker/* To avoid deadlock with uv_cancel() it's crucial that the worker * never holds the global mutex and the loop-local mutex at the same time. */static void worker(void* arg) { struct uv__work* w; QUEUE* q; (void) arg; for (;;) { uv_mutex_lock(&mutex); while (QUEUE_EMPTY(&wq)) { idle_threads += 1; uv_cond_wait(&cond, &mutex); idle_threads -= 1; } q = QUEUE_HEAD(&wq); if (q == &exit_message) uv_cond_signal(&cond); else { QUEUE_REMOVE(q); QUEUE_INIT(q); /* Signal uv_cancel() that the work req is executing. */ } uv_mutex_unlock(&mutex); if (q == &exit_message) break; w = QUEUE_DATA(q, struct uv__work, wq); w->work(w); uv_mutex_lock(&w->loop->wq_mutex); w->work = NULL; /* Signal uv_cancel() that the work req is done executing. */ QUEUE_INSERT_TAIL(&w->loop->wq, &w->wq); uv_async_send(&w->loop->wq_async); uv_mutex_unlock(&w->loop->wq_mutex); }}
开发者ID:Samsung,项目名称:libtuv,代码行数:44,
示例6: StopONSConsumerV8::~ONSConsumerV8(){ Stop(); uv_mutex_lock(&mutex); if(real_consumer) delete real_consumer; if(listener) delete listener; uv_mutex_unlock(&mutex); uv_mutex_destroy(&mutex); uv_close((uv_handle_t*)&async, NULL);}
开发者ID:pmq20,项目名称:aliyun-ons,代码行数:12,
示例7: luv_queue_channel_stopstatic int luv_queue_channel_stop(lua_State* L){ luv_queue_t* queue = luv_queue_check_queue_t(L); uv_mutex_lock(&luv_queues_lock); if (queue->async_cb != LUA_REFNIL) { uv_close((uv_handle_t*)&queue->async, NULL); queue->async_cb = LUA_REFNIL; } uv_mutex_unlock(&luv_queues_lock); return 0;}
开发者ID:czanyou,项目名称:node.lua,代码行数:12,
示例8: uv_mutex_lockvoid Clients::disconnect(uv_stream_t *stream, TcpClient* client){ stream->data = nullptr; uv_mutex_lock(&this->mutex); this->connected.unsafe_erase(stream); uv_mutex_unlock(&this->mutex); this->available_clients.push(client); LOG(INFO) << "Client " << static_cast<void*>(client) << " disconnected";}
开发者ID:mainnika,项目名称:banana-server,代码行数:12,
示例9: mrb_uv_oncestatic mrb_valuemrb_uv_once(mrb_state *mrb, mrb_value self){ uv_mutex_lock(&once_info.lock); once_info.mrb = mrb; once_info.block = mrb_iv_get(mrb, self, mrb_intern_lit(mrb, "once_cb")); uv_once((uv_once_t*)DATA_PTR(self), _uv_once_cb); uv_mutex_unlock(&once_info.lock); return self;}
开发者ID:charlydagos,项目名称:mruby-uv,代码行数:12,
示例10: uv_barrier_waitvoid uv_barrier_wait(uv_barrier_t* barrier) { uv_mutex_lock(&barrier->mutex); if (++barrier->count == barrier->n) { uv_sem_wait(&barrier->turnstile2); uv_sem_post(&barrier->turnstile1); } uv_mutex_unlock(&barrier->mutex); uv_sem_wait(&barrier->turnstile1); uv_sem_post(&barrier->turnstile1); uv_mutex_lock(&barrier->mutex); if (--barrier->count == 0) { uv_sem_wait(&barrier->turnstile1); uv_sem_post(&barrier->turnstile2); } uv_mutex_unlock(&barrier->mutex); uv_sem_wait(&barrier->turnstile2); uv_sem_post(&barrier->turnstile2);}
开发者ID:GalaxyData2015,项目名称:httpuv,代码行数:21,
示例11: printfKinect::~Kinect() { printf("Error: need to free buffers./n"); uv_mutex_lock(&mutex); must_stop = true; uv_mutex_unlock(&mutex); uv_thread_join(&thread); if(ctx) { freenect_close_device(device); freenect_shutdown(ctx); ctx = NULL; } uv_mutex_destroy(&mutex); has_new_rgb = false; has_new_depth = false; if(depth_back) { delete[] depth_back; } if(depth_mid) { delete[] depth_mid; } if(depth_front) { delete[] depth_front; } depth_back = NULL; depth_mid = NULL; depth_front = NULL; if(rgb_back) { delete[] rgb_back; } if(rgb_mid) { delete[] rgb_mid; } if(rgb_front) { delete[] rgb_front; } rgb_back = NULL; rgb_mid = NULL; rgb_front = NULL; device = NULL;}
开发者ID:HellicarAndLewis,项目名称:Swnt,代码行数:53,
示例12: ui_bridge_suspendstatic void ui_bridge_suspend(UI *b){ UIBridgeData *data = (UIBridgeData *)b; uv_mutex_lock(&data->mutex); UI_CALL(b, suspend, 1, b); data->ready = false; // suspend the main thread until CONTINUE is called by the UI thread while (!data->ready) { uv_cond_wait(&data->cond, &data->mutex); } uv_mutex_unlock(&data->mutex);}
开发者ID:TheSoftwareGuy,项目名称:neovim,代码行数:12,
示例13: uv_chan_clearvoid uv_chan_clear(uv_chan_t *chan) { uv_mutex_lock(&chan->mutex); uv__chan_item_t *item = NULL; QUEUE *head = NULL; while (!QUEUE_EMPTY(&chan->q)) { head = QUEUE_HEAD(&chan->q); item = QUEUE_DATA(head, uv__chan_item_t, active_queue); QUEUE_REMOVE(head); free(item); } uv_mutex_unlock(&chan->mutex);}
开发者ID:Dickordia,项目名称:mapbox-gl-native,代码行数:12,
示例14: uv__stream_osx_selectvoid uv__stream_osx_select(void* arg) { uv_stream_t* stream; uv__stream_select_t* s; fd_set read; fd_set write; fd_set error; struct timeval timeout; int events; int fd; int r; stream = arg; s = stream->select; fd = stream->fd; while (1) { /* Terminate on semaphore */ if (uv_sem_trywait(&s->sem) == 0) break; /* Watch fd using select(2) */ FD_ZERO(&read); FD_ZERO(&write); FD_ZERO(&error); FD_SET(fd, &read); FD_SET(fd, &write); FD_SET(fd, &error); timeout.tv_sec = 0; timeout.tv_usec = 250000; /* 250 ms timeout */ r = select(fd + 1, &read, &write, &error, &timeout); if (r == -1) { if (errno == EINTR) continue; /* XXX: Possible?! */ abort(); } /* Ignore timeouts */ if (r == 0) continue; /* Handle events */ events = 0; if (FD_ISSET(fd, &read)) events |= UV__IO_READ; if (FD_ISSET(fd, &write)) events |= UV__IO_WRITE; if (FD_ISSET(fd, &error)) events |= UV__IO_ERROR; uv_mutex_lock(&s->mutex); s->events |= events; uv_mutex_unlock(&s->mutex); if (events != 0) uv_async_send(&s->async); }}
开发者ID:IAmAnubhavSaini,项目名称:node,代码行数:52,
示例15: uv__wake_all_loopsvoid uv__wake_all_loops(void) { int i; uv_loop_t* loop; uv_mutex_lock(&uv__loops_lock); for (i = 0; i < uv__loops_size; ++i) { loop = uv__loops[i]; assert(loop); if (loop->iocp != INVALID_HANDLE_VALUE) PostQueuedCompletionStatus(loop->iocp, 0, 0, NULL); } uv_mutex_unlock(&uv__loops_lock);}
开发者ID:Kitware,项目名称:CMake,代码行数:13,
示例16: uv__work_cancelstatic int uv__work_cancel(uv_loop_t* loop, uv_req_t* req, struct uv__work* w) { int cancelled; uv_mutex_lock(&mutex); uv_mutex_lock(&w->loop->wq_mutex); cancelled = !QUEUE_EMPTY(&w->wq) && w->work != NULL; if (cancelled) QUEUE_REMOVE(&w->wq); uv_mutex_unlock(&w->loop->wq_mutex); uv_mutex_unlock(&mutex); if (!cancelled) return -1; w->work = uv__cancelled; uv_mutex_lock(&loop->wq_mutex); QUEUE_INSERT_TAIL(&loop->wq, &w->wq); uv_async_send(&loop->wq_async); uv_mutex_unlock(&loop->wq_mutex); return 0;}
开发者ID:Andrepuel,项目名称:jxcore,代码行数:22,
示例17: deserialize_sc_deps/* Loads the SC dependencies list. */static void deserialize_sc_deps(MVMThreadContext *tc, MVMCompUnit *cu, ReaderState *rs) { MVMCompUnitBody *cu_body = &cu->body; MVMuint32 i, sh_idx; MVMuint8 *pos; /* Allocate SC lists in compilation unit. */ cu_body->scs = MVM_malloc(rs->expected_scs * sizeof(MVMSerializationContext *)); cu_body->scs_to_resolve = MVM_malloc(rs->expected_scs * sizeof(MVMSerializationContextBody *)); cu_body->sc_handle_idxs = MVM_malloc(rs->expected_scs * sizeof(MVMint32)); cu_body->num_scs = rs->expected_scs; /* Resolve all the things. */ pos = rs->sc_seg; for (i = 0; i < rs->expected_scs; i++) { MVMSerializationContextBody *scb; MVMString *handle; /* Grab string heap index. */ ensure_can_read(tc, cu, rs, pos, 4); sh_idx = read_int32(pos, 0); pos += 4; /* Resolve to string. */ if (sh_idx >= cu_body->num_strings) { cleanup_all(tc, rs); MVM_exception_throw_adhoc(tc, "String heap index beyond end of string heap"); } cu_body->sc_handle_idxs[i] = sh_idx; handle = MVM_cu_string(tc, cu, sh_idx); /* See if we can resolve it. */ uv_mutex_lock(&tc->instance->mutex_sc_weakhash); MVM_string_flatten(tc, handle); MVM_HASH_GET(tc, tc->instance->sc_weakhash, handle, scb); if (scb && scb->sc) { cu_body->scs_to_resolve[i] = NULL; MVM_ASSIGN_REF(tc, &(cu->common.header), cu_body->scs[i], scb->sc); } else { if (!scb) { scb = MVM_calloc(1, sizeof(MVMSerializationContextBody)); scb->handle = handle; MVM_HASH_BIND(tc, tc->instance->sc_weakhash, handle, scb); MVM_sc_add_all_scs_entry(tc, scb); } cu_body->scs_to_resolve[i] = scb; cu_body->scs[i] = NULL; } uv_mutex_unlock(&tc->instance->mutex_sc_weakhash); }}
开发者ID:tomboy-64,项目名称:MoarVM,代码行数:52,
示例18: start_query_execution /** * Start the query execution thread */ void start_query_execution() { is_running_ = true; is_error_ = false; is_warming_up_ = true; memset(max_node_latency, 0, sizeof(max_node_latency)); uv_thread_create(&thread_, start_thread, NULL); // Allow metrics to gather some initial data uv_mutex_lock(&lock_); while (is_warming_up_) { uv_cond_wait(&condition_, &lock_); } uv_mutex_unlock(&lock_); }
开发者ID:Shauwe,项目名称:cpp-driver,代码行数:17,
示例19: _locking_callbackstatic void_locking_callback (int mode, int n, const char* file, int line){ if (locks.length > n) { return; } if (mode & CRYPTO_LOCK) { uv_mutex_lock(&locks.item[n]); } else { uv_mutex_unlock(&locks.item[n]); }}
开发者ID:postfix,项目名称:libtor,代码行数:14,
示例20: qsf_setenvvoid qsf_setenv(const char* key, const char* value){ lua_State* L = global_env.L; assert(L && key && value); uv_mutex_lock(&global_env.mutex); lua_getglobal(L, key); if (lua_isnil(L, -1)) { lua_pushstring(L, value); lua_setglobal(L, key); } lua_pop(L, 1); uv_mutex_unlock(&global_env.mutex);}
开发者ID:zhangjinde,项目名称:QSF,代码行数:14,
示例21: pc__client_reconnect_resetvoid pc__client_reconnect_reset(pc_client_t *client) { assert(client); if(client->transport) { pc_transport_destroy(client->transport); client->transport = NULL; } if(client->heartbeat_timer != NULL) { uv_timer_stop(client->heartbeat_timer); client->heartbeat = 0; } if(client->timeout_timer != NULL) { uv_timer_stop(client->timeout_timer); client->timeout = 0; } if(client->requests) { pc_map_clear(client->requests); } if(client->pkg_parser) { pc_pkg_parser_reset(client->pkg_parser); } if(client->handshake_opts) { json_decref(client->handshake_opts); client->handshake_opts = NULL; } if(client->route_to_code) { json_decref(client->route_to_code); client->route_to_code = NULL; } if(client->code_to_route) { json_decref(client->code_to_route); client->code_to_route = NULL; } if(client->server_protos) { json_decref(client->server_protos); client->server_protos = NULL; } if(client->client_protos) { json_decref(client->client_protos); client->client_protos = NULL; } uv_mutex_lock(&client->state_mutex); client->state = PC_ST_INITED; uv_mutex_unlock(&client->state_mutex);}
开发者ID:559210,项目名称:libpomelo,代码行数:50,
示例22: uv_mutex_lockint CX264Encoder2::Put(AVFrame* frame){ uv_mutex_lock(pQueueMutex); if(queueFrame.size() > 50){ uv_mutex_unlock(pQueueMutex); av_frame_free(&frame); return 0; } queueFrame.push_back(frame); printf("%d", queueFrame.size()); uv_mutex_unlock(pQueueMutex); uv_cond_signal(pQueueNotEmpty); return 0;}
开发者ID:zhifeichen,项目名称:libcapture,代码行数:14,
示例23: jl_wakeup_threadJL_DLLEXPORT void jl_wakeup_thread(int16_t tid){ jl_ptls_t ptls = jl_get_ptls_states(); /* ensure thread tid is awake if necessary */ if (ptls->tid != tid && !_threadedregion && tid != -1) { uv_mutex_lock(&sleep_lock); uv_cond_broadcast(&sleep_alarm); // TODO: make this uv_cond_signal / just wake up correct thread uv_mutex_unlock(&sleep_lock); } if (_threadedregion && jl_uv_mutex.owner != jl_thread_self()) jl_wake_libuv(); else uv_stop(jl_global_event_loop());}
开发者ID:KDr2,项目名称:julia,代码行数:14,
示例24: Writev8::Handle<v8::Value> Write(const v8::Arguments& args) { v8::HandleScope scope; // file descriptor if(!args[0]->IsInt32()) { return scope.Close(v8::ThrowException(v8::Exception::TypeError(v8::String::New("First argument must be an int")))); } int fd = args[0]->ToInt32()->Int32Value(); // buffer if(!args[1]->IsObject() || !node::Buffer::HasInstance(args[1])) { return scope.Close(v8::ThrowException(v8::Exception::TypeError(v8::String::New("Second argument must be a buffer")))); } v8::Persistent<v8::Object> buffer = v8::Persistent<v8::Object>::New(args[1]->ToObject()); char* bufferData = node::Buffer::Data(buffer); size_t bufferLength = node::Buffer::Length(buffer); // callback if(!args[2]->IsFunction()) { return scope.Close(v8::ThrowException(v8::Exception::TypeError(v8::String::New("Third argument must be a function")))); } v8::Local<v8::Value> callback = args[2]; WriteBaton* baton = new WriteBaton(); memset(baton, 0, sizeof(WriteBaton)); baton->fd = fd; baton->buffer = buffer; baton->bufferData = bufferData; baton->bufferLength = bufferLength; // baton->offset = 0; baton->callback = v8::Persistent<v8::Value>::New(callback); QueuedWrite* queuedWrite = new QueuedWrite(); memset(queuedWrite, 0, sizeof(QueuedWrite)); ngx_queue_init(&queuedWrite->queue); queuedWrite->baton = baton; queuedWrite->req.data = queuedWrite; uv_mutex_lock(&write_queue_mutex); bool empty = ngx_queue_empty(&write_queue); ngx_queue_insert_tail(&write_queue, &queuedWrite->queue); if (empty) { uv_queue_work(uv_default_loop(), &queuedWrite->req, EIO_Write, (uv_after_work_cb)EIO_AfterWrite); } uv_mutex_unlock(&write_queue_mutex); return scope.Close(v8::Undefined());}
开发者ID:CryptArc,项目名称:lamassu-machine,代码行数:50,
示例25: eventpool_triggervoid eventpool_trigger(int reason, void *(*done)(void *), void *data) { if(eventpoolinit == 0) { return; }#ifdef _WIN32 SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_HIGHEST);#else struct sched_param sched; memset(&sched, 0, sizeof(sched)); sched.sched_priority = 80; pthread_setschedparam(pthread_self(), SCHED_RR, &sched);#endif int eventqueue_size = 0; struct eventqueue_t *node = MALLOC(sizeof(struct eventqueue_t)); if(node == NULL) { OUT_OF_MEMORY /*LCOV_EXCL_LINE*/ } memset(node, 0, sizeof(struct eventqueue_t)); node->reason = reason; node->done = done; node->data = data; uv_mutex_lock(&listeners_lock); struct eventqueue_t *tmp = eventqueue; if(tmp != NULL) { while(tmp->next != NULL) { eventqueue_size++; tmp = tmp->next; } tmp->next = node; node = tmp; } else { node->next = eventqueue; eventqueue = node; } /* * If the eventqueue size is above * 50 entries then there must be a bug * at the trigger side. */ assert(eventqueue_size < 50); uv_mutex_unlock(&listeners_lock); uv_async_send(async_req);}
开发者ID:pilight,项目名称:pilight,代码行数:49,
示例26: assert// OnDrainWriteQueue ensures that all ByteArrays queued up in the TLSConnection's// write queue are sent.void TLSConnectionPrivate::OnDrainWriteQueue(uv_async_t *handle, int status) { assert(handle != nullptr); assert(handle->data != nullptr); TLSConnectionPrivate *cp = static_cast<TLSConnectionPrivate *>(handle->data); if (cp->state_ == TLS_CONNECTION_STATE_ESTABLISHED) { uv_mutex_lock(&cp->wqlock_); while (cp->wq_.size() > 0) { const ByteArray &buf = cp->wq_.front(); cp->Write(buf); cp->wq_.pop(); } uv_mutex_unlock(&cp->wqlock_); }}
开发者ID:dafoxia,项目名称:libmumble,代码行数:17,
示例27: luv_queue_channel_gcstatic int luv_queue_channel_gc(lua_State* L){ luv_queue_t* queue = luv_queue_check_queue_t(L); printf("chan_gc: %s, refs=%d/n", queue->name, queue->refs); uv_mutex_lock(&luv_queues_lock); if (queue->async_cb != LUA_REFNIL) { uv_close((uv_handle_t*)&queue->async, NULL); queue->async_cb = LUA_REFNIL; } luv_queue_release(queue); uv_mutex_unlock(&luv_queues_lock); return 0;}
开发者ID:czanyou,项目名称:node.lua,代码行数:15,
示例28: mainint main() { assert(0 == uv_mutex_init(&mutex)); assert(0 == uv_thread_create(&thread, thread_cb, NULL)); uv_mutex_lock(&mutex); printf("main mutex start/n"); sleep(1); printf("main mutex end/n"); uv_mutex_unlock(&mutex); uv_thread_join(&thread); uv_mutex_destroy(&mutex); return 0;}
开发者ID:rwaldron,项目名称:libuv-examples,代码行数:15,
示例29: uv_mutex_lockvoid UploadRequest::removeServer(GameServerSession* server) { std::unordered_map<uint32_t, UploadRequest*>::const_iterator it, itEnd; uv_mutex_lock(&mapLock); for(it = pendingRequests.begin(), itEnd = pendingRequests.end(); it != itEnd;) { UploadRequest* client = it->second; if(client->getGameServer() == server) { it = pendingRequests.erase(it); delete client; } else { ++it; } } uv_mutex_unlock(&mapLock);}
开发者ID:glandu2,项目名称:rzauth,代码行数:15,
注:本文中的uv_mutex_lock函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ uv_mutex_unlock函数代码示例 C++ uv_mutex_init函数代码示例 |