1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
use crateWorker;
use crateAioDriver;
use crateUringDriver; // Import UringDriver
use crate;
use BlockingRxTrait;
use io;
/// Setup the submission of IO tasks to the underlying driver.
///
/// It is generic over the callback type `C`, the submission queue `Q`, and the worker type `W`.
///
/// # Channel Selection for `W` (Worker)
///
/// When configuring the worker `W` (usually a channel sender `cb_workers`),
/// you should choose the `crossfire` channel type based on your sharing model:
///
/// * **Shared Worker (Multiple Producers):** If you have multiple submission channels sharing the same
/// callback worker, use the [IOWorkers](crate::callback_worker::IOWorkers) struct,
/// or pass `crossfire::MTx` (from `mpsc` or `mpmc` channels) with your custom worker implementation.
/// This allows multiple producers to send completion events to a single consumer (worker).
///
/// * **Single Instance (Dedicated Worker):** If you have a single submission channel with its own dedicated
/// callback worker, use `crossfire::Tx` (from `spsc` channels). This is more efficient for single-producer
/// scenarios.
///
/// * **inline callback:** If you have a very light callback logic, you can use [Inline](crate::callback_worker::Inline)