{"push_id":1010495062,"size":1,"distinct_size":0,"ref":"refs/heads/master","head":"3df71ab0f668967cf37813cc2322d1993a4d5db1","before":"96bb964dd599d25778ad2f0378d0192b9855311b","commits":[{"sha":"3df71ab0f668967cf37813cc2322d1993a4d5db1","author":{"email":"2b86f6241662470a896308e9fdf77b3fa62cbba6@rasterman.com","name":"Carsten Haitzler (Rasterman)"},"message":"eo del interceptor: add the ability to intercept deletions of eo objects\n\nImagine this. You have an object. You pass this object handle as a\nmessage to another thread. Let's say it's not a UI object, so\nsomething you might expect to be able to be accessed from multiple\nthreads. In order to keep the object alive you eo_ref() it when\nplacing the message on a queue and eo_unref() it once the message is\n\"done\" in the other thread. If the original sender unref()ed the\nobject before the message is done, then the object will be destroyed\nin the reciever thread. This is bad for objects \"expecting\" not to be\ndestroyed outside their owning thread.\n\nThis allows thius situation to be fixed. A constructor in a class of\nan object can set up a delete interceptor. For example if we have a\n\"loop ownership\" class you multi-ple-inherit from/use as a mixin. This\nclass will set up the interceptor to ensure that on destruction if\npthread_self() != owning loop thread id, then add object to \"delete\nme\" queue on the owning loop and wake it up. the owning loop thread\nwill wake up and then process this queue and delete the queued objects\nnicely and safely within the \"owning context\".\n\nThis can also be used in this same manner to defer deletion within a\nloop \"until later\" in the same delete_me queue.\n\nYou can even use this as a caching mechanism for objects to prevernt\ntheir actual destruction and instead place them in a cached area to be\npicked from at a later date.\n\nThe uses are many for this and this is a basic building block for\nfuture EFL features like generic messages where a message payload\ncould be an eo object and thus the above loop onwership issue can\nhappen and needs fixing.\n\nThis adds APIs, implementation, documentation (doxy reference) and tests.\n\n@feature","distinct":false,"url":"https://api.github.com/repos/tasn/efl/commits/3df71ab0f668967cf37813cc2322d1993a4d5db1"}]}