<div dir="ltr"><div><div><div><div>I have a need to lookup a tuple based on a 32-bit integer key and remove it from a set after it is found. The set is shared by 2 processes - one inserts the tuple and the other performs a lookup followed by a delete.<br><br>So, I am considering ETS versus selective receive. Consideration for selective receive because I need the lookup call to block until the tuple becomes available in the set.<br><br></div>I suppose selective receive will not be able to lookup in constant time whereas set-ETS will! But, I favour the selective receive because it makes the code so simple and intuitive. <br><br>So, my question is this - till what point, in terms of number of tuples in the set, the selective receive will be effective. The insertion in the set is capped at 400 tuples per second, but the lookup (followed by a delete) will be considerably slower (by 20 to 70%) than the rate of inserts.<br><br></div>Please advise on considerations that apply in this situation in order to employ a suitable scheme.<br><br></div>Thanks<br></div>Avinash<br></div>