3 ms·
They are, but in a similar way to how objects are basically just structs in disguise. You can use semaphores to build promises, but like all other abstractions
by awj 14y ago
They are, but in a similar way to how objects are basically just structs in disguise. You can use semaphores to build promises, but like all other abstractions it's better to have it be shared amongst all the code you use. The "get the result of this computation or tell me when it ends and maybe tell me about progress" pattern is common enough that it might as well get written once and be a generally available tool.
- seivan 14y agoTrue. Going to look if I can build a generic way of doing promises via semaphores in obj-c so the code base follows the same pattern overall. Just for fun, I suppose there are already better solutions out there. But none of them use signals.