mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
remove unused skynet_context_init
This commit is contained in:
@@ -132,6 +132,8 @@ skynet_context_new(const char * name, const char *param) {
|
||||
|
||||
ctx->init = false;
|
||||
ctx->endless = false;
|
||||
// Should set to 0 first to avoid skynet_handle_retireall get an uninitialized handle
|
||||
ctx->handle = 0;
|
||||
ctx->handle = skynet_handle_register(ctx);
|
||||
struct message_queue * queue = ctx->queue = skynet_mq_create(ctx->handle);
|
||||
// init function maybe use ctx->handle, so it must init at last
|
||||
@@ -646,11 +648,6 @@ skynet_context_handle(struct skynet_context *ctx) {
|
||||
return ctx->handle;
|
||||
}
|
||||
|
||||
void
|
||||
skynet_context_init(struct skynet_context *ctx, uint32_t handle) {
|
||||
ctx->handle = handle;
|
||||
}
|
||||
|
||||
void
|
||||
skynet_callback(struct skynet_context * context, void *ud, skynet_cb cb) {
|
||||
context->cb = cb;
|
||||
|
||||
Reference in New Issue
Block a user