File tree Expand file tree Collapse file tree 5 files changed +25
-0
lines changed Expand file tree Collapse file tree 5 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ A Byzantine-fault tolerant sidechain with low-latency finality and high throughp
137137* ` --wait-for-outgoing-messages ` — Whether to wait until a quorum of validators has confirmed that all sent cross-chain messages have been delivered
138138* ` --long-lived-services ` — (EXPERIMENTAL) Whether application services can persist in some cases between queries
139139* ` --tokio-threads <TOKIO_THREADS> ` — The number of Tokio worker threads to use
140+ * ` --tokio-blocking-threads <TOKIO_BLOCKING_THREADS> ` — The number of Tokio blocking threads to use
140141* ` --blanket-message-policy <BLANKET_MESSAGE_POLICY> ` — The policy for handling incoming messages
141142
142143 Default value: ` accept `
Original file line number Diff line number Diff line change @@ -145,6 +145,10 @@ pub struct ClientOptions {
145145 #[ arg( long, env = "LINERA_CLIENT_TOKIO_THREADS" ) ]
146146 pub tokio_threads : Option < usize > ,
147147
148+ /// The number of Tokio blocking threads to use.
149+ #[ arg( long) ]
150+ pub tokio_blocking_threads : Option < usize > ,
151+
148152 /// The policy for handling incoming messages.
149153 #[ arg( long, default_value = "accept" ) ]
150154 pub blanket_message_policy : BlanketMessagePolicy ,
Original file line number Diff line number Diff line change @@ -1290,6 +1290,10 @@ fn main() -> anyhow::Result<()> {
12901290 builder
12911291 } ;
12921292
1293+ if let Some ( blocking_threads) = options. tokio_blocking_threads {
1294+ runtime. max_blocking_threads ( blocking_threads) ;
1295+ }
1296+
12931297 let span = tracing:: info_span!( "linera::main" ) ;
12941298 if let Some ( wallet_id) = & options. with_wallet {
12951299 span. record ( "wallet_id" , wallet_id) ;
Original file line number Diff line number Diff line change @@ -58,6 +58,10 @@ pub struct ProxyOptions {
5858 #[ arg( long, env = "LINERA_PROXY_TOKIO_THREADS" ) ]
5959 tokio_threads : Option < usize > ,
6060
61+ /// The number of Tokio blocking threads to use.
62+ #[ arg( long) ]
63+ tokio_blocking_threads : Option < usize > ,
64+
6165 /// Storage configuration for the blockchain history, chain states and binary blobs.
6266 #[ arg( long = "storage" ) ]
6367 storage_config : StorageConfigNamespace ,
@@ -390,6 +394,10 @@ fn main() -> Result<()> {
390394 builder
391395 } ;
392396
397+ if let Some ( blocking_threads) = options. tokio_blocking_threads {
398+ runtime. max_blocking_threads ( blocking_threads) ;
399+ }
400+
393401 runtime. enable_all ( ) . build ( ) ?. block_on ( options. run ( ) )
394402}
395403
Original file line number Diff line number Diff line change @@ -283,6 +283,10 @@ struct ServerOptions {
283283 /// The number of Tokio worker threads to use.
284284 #[ arg( long, env = "LINERA_SERVER_TOKIO_THREADS" ) ]
285285 tokio_threads : Option < usize > ,
286+
287+ /// The number of Tokio blocking threads to use.
288+ #[ arg( long) ]
289+ tokio_blocking_threads : Option < usize > ,
286290}
287291
288292#[ derive( Debug , PartialEq , Eq , Deserialize ) ]
@@ -521,6 +525,10 @@ fn main() {
521525 builder
522526 } ;
523527
528+ if let Some ( blocking_threads) = options. tokio_blocking_threads {
529+ runtime. max_blocking_threads ( blocking_threads) ;
530+ }
531+
524532 runtime
525533 . enable_all ( )
526534 . build ( )
You can’t perform that action at this time.
0 commit comments