Coroutine support for Mudlet's C API functions

Registered by Vadim Peretokin on 2012-02-19

It is currently impossible to call Mudlet's C api functions from coroutines, because they all follow this design pattern:

Host * pHost = TLuaInterpreter::luaInterpreterMap[L];

Where the associated host is retrieved from a map of Lua states. coroutines have their own Lua state, and thus the proper host is not locatable from a coroutine calling a Mudlet function.

A fix for this would be to convert all functions to instead store and retrieve the host from the VMs registry, because coroutines share it.

http://www.lua.org/pil/27.3.1.html

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
Vadim Peretokin
Definition:
Pending Approval
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.