Refactoring: remove the hack with storing txn in fiber.
Continue cherry-picking refactoring ideas from txn-refine tree. We only needed to store txn in fiber because in port_lua implementation we needed to access lua_State. Instead of keeping this indirect dependency, pass around ports explicitly. On the same token, make ports Objective C classes: this is necessary to make them stateful. In port_lua state keep a pointer to lua thread, and allocate a new port_lua instance on each lbox_process call. The port is currently allocated on fiber->gc_pool and never destroyed.
Showing
- include/fiber.h 0 additions, 5 deletionsinclude/fiber.h
- include/iproto.h 1 addition, 1 deletioninclude/iproto.h
- mod/box/box.h 40 additions, 0 deletionsmod/box/box.h
- mod/box/box.m 33 additions, 28 deletionsmod/box/box.m
- mod/box/box_lua.h 2 additions, 1 deletionmod/box/box_lua.h
- mod/box/box_lua.m 33 additions, 47 deletionsmod/box/box_lua.m
- mod/box/memcached-grammar.m 220 additions, 227 deletionsmod/box/memcached-grammar.m
- mod/box/memcached-grammar.rl 1 addition, 8 deletionsmod/box/memcached-grammar.rl
- mod/box/memcached.m 5 additions, 11 deletionsmod/box/memcached.m
- mod/box/port.h 27 additions, 9 deletionsmod/box/port.h
- mod/box/port.m 61 additions, 29 deletionsmod/box/port.m
- mod/box/request.h 2 additions, 3 deletionsmod/box/request.h
- mod/box/request.m 19 additions, 18 deletionsmod/box/request.m
- mod/box/txn.h 4 additions, 3 deletionsmod/box/txn.h
- mod/box/txn.m 1 addition, 6 deletionsmod/box/txn.m
- src/iproto.m 2 additions, 2 deletionssrc/iproto.m
Loading
Please register or sign in to comment