remove unused skynet_context_init

This commit is contained in:
Cloud Wu
2014-07-29 10:31:45 +08:00
parent 25a8b3a179
commit 8e09fad233
4 changed files with 15 additions and 12 deletions

View File

@@ -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;