You mean because obj[10] could have been deleted by its thread?
Because that is the only inherently unsafe part in that call.
That of course also accesses "obj" without any guard, so it has the same problem as the direct method call.
The only difference is that "someMethod" will be executed by the object's owner thread, which also has to run an event loop to be able to do that.
Cheers,
_






Reply With Quote

Bookmarks