|
|
|
|
|
by amelius
3784 days ago
|
|
Why not just use the database to handle the "locking" for you? For example, to ensure that an email with ID=123 gets sent only once, just check if "email 123 sent" is in the database, otherwise commit it to the database, wait for the transaction to be committed, and send the email. Edit: Why is this downvoted? It is a serious question. |
|