When the system is not capable to play the sound, do not throw exception, just log it. For example on Linux there are several issues to play sound and there are no workarounds for that :(
layout, title, folder, permalink, categories, tags
layout | title | folder | permalink | categories | tags | |||
---|---|---|---|---|---|---|---|---|
pattern | Event Queue | event-queue | /patterns/event-queue/ | Concurrency |
|
Intent
Event Queue is a good pattern if You have a limited accesibility resource (for example: Audio or Database), but You need to handle all the requests that want to use that. It puts all the requests in a queue and process them asynchronously. Gives the resource for the event when it is the next in the queue and in same time removes it from the queue.
Applicability
Use the Event Queue pattern when
- You have a limited accesibility resource and the asynchronous process is acceptable to reach that
Credits
- [Mihály Kuprivecz - Event Queue]