Persistent objects
#6
I don't think this is safe for most of the API. The difference between most of the DoWithXYZ vs the networking code is observability. Nothing other than plugin and plugin support code is interacting with a cTCPLink. So a plugin can mutate the Link any time it likes. WIth an entity retrived from DoWithEntityByID there is nothing that you can safely do outside the callback. Yes we could slightly simpilify the code with a handle object to hide the fact that you have to store the ID and not the pointer, but anything else would have severe multithreading issues. You still need the callback.
Reply
Thanks given by:


Messages In This Thread
Persistent objects - by xoft - 04-13-2015, 01:12 AM
RE: Persistent objects - by NiLSPACE - 04-13-2015, 02:10 AM
RE: Persistent objects - by FakeTruth - 04-13-2015, 06:10 AM
RE: Persistent objects - by xoft - 04-13-2015, 07:46 AM
RE: Persistent objects - by worktycho - 04-15-2015, 09:40 AM
RE: Persistent objects - by worktycho - 04-15-2015, 10:11 PM
RE: Persistent objects - by worktycho - 05-01-2015, 12:00 AM



Users browsing this thread: 1 Guest(s)