Multiple choice technology databases

Choose the two similar scenarios out of the following :

  1. poll and timed dispatch of 0

  2. dispatch and timed dispatch of –1

  3. poll and timed dispatch of –1

  4. dispatch and timed dispatch of 0

Reveal answer Fill a bubble to check yourself
A,B Correct answer
Explanation

Poll() and timed dispatch with 0 seconds are functionally similar - both check for events and return immediately without waiting. Dispatch() and timed dispatch with -1 seconds are similar - both block indefinitely waiting for events. Option C pairs poll (non-blocking) with -1 (blocking), which are different behaviors. Option D pairs dispatch (blocking) with 0 (non-blocking), which are also different.