Skip to content
Snippets Groups Projects
Commit 4bad376f authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Vladimir Davydov
Browse files

net.box: alert worker fiber unconditionally on request

There's no need to optimize out fiber.wakeup:
 - we already have C function calls on the code path;
 - fiber.wakeup is pretty cheap to be called unconditionally.

This is a preparation for moving send/recv buffers to C.
parent 38d99958
No related branches found
No related tags found
No related merge requests found
......@@ -322,11 +322,8 @@ local function create_transport(host, port, user, password, callback,
local msg = string.format("Connection is closing")
return box.error.new({code = code, reason = msg})
end
-- alert worker to notify it of the queued outgoing data;
-- if the buffer wasn't empty, assume the worker was already alerted
if send_buf:size() == 0 then
worker_fiber:wakeup()
end
-- Alert worker to notify it of the queued outgoing data.
worker_fiber:wakeup()
end
--
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment