Tornado 6.5 DocumentationApplication([ (r"/", MainHandler), ]) async def main(): app = make_app() app.listen(8888) await asyncio.Event().wait() if __name__ == "__main__": asyncio.run(main()) This example does not use any of Tornado’s INTEGRATION Tornado is integrated with the standard library asyncio module and shares the same event loop (by default since Tornado 5.0). In general, libraries designed for use with asyncio can be mixed very expensive. To minimize the cost of concurrent connections, Tornado uses a single-threaded event loop. This means that all appli- cation code should aim to be asynchronous and non-blocking because0 码力 | 272 页 | 1.12 MB | 3 月前3
Tornado 6.5 DocumentationMainHandler), ]) async def main(): app = make_app() app.listen(8888) await asyncio.Event().wait()if __name__ == "__main__": asyncio.run(main()) This example does not use any of Tornado’s asyncio [https://docs.python.org/3/library/asyncio.html#module-asyncio] module and shares the same event loop (by default since Tornado 5.0). In general, libraries designed for use with asyncio [https://docs http1connection – HTTP/1.x client/server implementation Asynchronous networking tornado.ioloop — Main event loop tornado.iostream — Convenient wrappers for non-blocking socketstornado.netutil — Miscellaneous0 码力 | 437 页 | 405.14 KB | 3 月前3
ethercat stackSSC ciere.com Beckhoff SSC extern "C" Plugins User provides functionality: ▶ Calls the main loop ▶ Provides call for process data handling ▶ Provides calls for interrupt control ▶ Calls interface Using C libraries in your Modern C++ Embedded Project The Interface Called in our main loop. The main loop processing for SSC void MainLoop(void); Called from SSC when cyclic data is available. void PUT ON SLIDES } } extern "C" { // This is the main loop in the SSC stack. void MainLoop(void); } int main() { init(); while (1U) { // The SSC main loop handles the EtherCAT state machine MainLoop(); /**0 码力 | 65 页 | 2.54 MB | 6 月前3
Just-In-Time Compilation: The Next Big Thing2CLING CLING [[CLANG::JIT]] [[CLANG::JIT]] 4 . 3* PRIMARY A READ–EVAL–PRINT LOOP (REPL) * PRIMARY A READ–EVAL–PRINT LOOP (REPL) * C++ LANGUAGE EXTENSION (ATTRIBUTE) * C++ LANGUAGE EXTENSION (ATTRIBUTE) CLING CLING [[CLANG::JIT]] [[CLANG::JIT]] 4 . 3* PRIMARY A READ–EVAL–PRINT LOOP (REPL) * PRIMARY A READ–EVAL–PRINT LOOP (REPL) * ALWAYS JIT COMPILES THE WHOLE PROGRAM * ALWAYS JIT COMPILES THE WHOLE CLING CLING [[CLANG::JIT]] [[CLANG::JIT]] 4 . 3* PRIMARY A READ–EVAL–PRINT LOOP (REPL) * PRIMARY A READ–EVAL–PRINT LOOP (REPL) * ALWAYS JIT COMPILES THE WHOLE PROGRAM * ALWAYS JIT COMPILES THE WHOLE0 码力 | 222 页 | 5.45 MB | 6 月前3
Python 标准库参考指南 3.6.15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 832 18.5 asyncio —Asynchronous I/O, event loop, coroutines and tasks . . . . . . . . . . . . . . . . . . . . 835 iii 18.6 asyncore —异步 socket interface. Like builtins.iter(func, sentinel) but uses an exception instead of a sentinel to end the loop. Examples: iter_except(functools.partial(heappop, h), IndexError) # priority queue␣ �→iterator iter_except(d.popleft, IndexError) # non-blocking deque␣ �→iterator iter_except(q.get_nowait, Queue.Empty) # loop over a␣ �→producer Queue (下页继续) 10.1. itertools —为高效循环而创建迭代器的函数 321 The Python Library Reference0 码力 | 1886 页 | 8.95 MB | 9 月前3
Python 标准库参考指南 3.6.15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 832 18.5 asyncio —Asynchronous I/O, event loop, coroutines and tasks . . . . . . . . . . . . . . . . . . . . 835 iii 18.6 asyncore —异步 socket interface. Like builtins.iter(func, sentinel) but uses an exception instead of a sentinel to end the loop. Examples: iter_except(functools.partial(heappop, h), IndexError) # priority queue␣ �→iterator iter_except(d.popleft, IndexError) # non-blocking deque␣ �→iterator iter_except(q.get_nowait, Queue.Empty) # loop over a␣ �→producer Queue (下页继续) 10.1. itertools —为高效循环而创建迭代器的函数 321 The Python Library Reference0 码力 | 1886 页 | 8.95 MB | 9 月前3
Comprehensive Rust(Persian ) 202412. 36 6.2.1 for . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 6.2.2 loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 6.3 break � continue error . 6.2 � � � � � � � � � � � � � � � � � � � � � � � � � Rust � � � � � � � � : ” while”� ”loop ” � ” for ”: � � � � � � � while � � � � � � � � � while � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � . 6.2.2 loop loop � � � � � � � � � � � � � � � � � � � � � » break « � � � � � � � � � � � � � � � � � � . fn main ) ( } let mut i = 0 ; loop } i += 1 ; 36 println!("{i {0 码力 | 393 页 | 987.97 KB | 10 月前3
Comprehensive Rust(Ukrainian) 202412. 35 6.2.1 for . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 6.2.2 loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 6.3 break та continue перед println!, щоб побачити помилку компілятора. 6.2 Цикли У Rust є три ключові слова циклу: while, loop і for: while Ключове слово while працює так само, як і в інших мовах, виконуючи тіло циклу доти 6.2.2 loop Оператор loop просто повторюється до нескінченності, поки не трапиться break. fn main() { let mut i = 0; loop { i += 1; println!("{i}"); if i > 100 { break; } } } • The loop statement0 码力 | 396 页 | 1.08 MB | 10 月前3
Comprehensive Rust(English) 202412. 34 6.2.1 for . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 6.2.2 loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 6.3 break and continue Loops There are three looping keywords in Rust: while, loop, and for: while The while keyword works much like in other languages, executing the loop body as long as the condition is true. fn main() { let mut x = 200; while x >= 10 { x = x / 2; } println!("Final x: {x}"); } 6.2.1 for The for loop iterates over ranges of values or the items in a collection: fn main() { for x in 1..5 { println0 码力 | 382 页 | 1.00 MB | 10 月前3
Python 标准库参考指南 3.7.13 interface. Like builtins.iter(func, sentinel) but uses an exception instead of a sentinel to end the loop. (下页继续) 312 Chapter 10. 函数式编程模块 The Python Library Reference, 发布 3.7.13 (续上页) Examples: iter_except(functools iter_except(d.popleft, IndexError) # non-blocking␣ �→deque iterator iter_except(q.get_nowait, Queue.Empty) # loop over a␣ �→producer Queue iter_except(s.pop, KeyError) # non-blocking␣ �→set iterator """ try: os.kill(pid, sig) 将信号 sig 发送至进程 pid。特定平台上可用的信号常量定义在signal 模块中。 Windows:signal.CTRL_C_EVENT 和signal.CTRL_BREAK_EVENT 信号是特殊信号,只能发 送给共享同一个控制台窗口的控制台进程,如某些子进程。sig 取任何其他值将导致该进程被 TerminateProcess API 无条件终止,且退出代码为0 码力 | 1846 页 | 9.09 MB | 9 月前3
共 307 条
- 1
- 2
- 3
- 4
- 5
- 6
- 31













