From Eager Futures/Promises to Lazy Continuations: Evolving an Actor Library Based on Lessons Learned## From Eager Futures/Promises to Lazy Continuations Evolving an Actor Library Based on Lessons Learned from Large-Scale Deployments ## prologue • past life at UC Berkeley, Twitter, Mesosphere/D2iQ to Nikita (@FolMing), Zakhar (@onelxj), and Artur (@ArthurBandaryk) ## chapters (1) motivating futures/promises + actors (2) libprocess (3) revisiting the problem (4) evolution of libprocess (5) eventuals eventuals (6) scheduling (7) streams (8) type erasure ## chapters (1) motivating futures/promises + actors (2) libprocess (3) revisiting the problem (4) evolution of libprocess (5) eventuals (6)0 码力 | 264 页 | 588.96 KB | 1 年前3
Concurrency in Rustblazingly fast, prevents segfaults, and guarantees thread safety. ## Concurrency? Rust? Libraries Futures ## What's concurrency? In computer science, concurrency is a property of systems in which several Conditions • Deadlocks • Use after free Exploitable! • Double free Concurrency? Rust? Libraries Futures ## What's Rust? Rust is a systems programming language that runs blazingly fast, prevents segfaults least one is unsynchronized • at least one is a write Mutation! Concurrency? Rust? Libraries Futures ## Rust Concurrency Libs • Language only provides ownership/borrowing • Libraries implement common0 码力 | 43 页 | 648.31 KB | 2 年前3
Tornado 4.5 Documentation
setup.py install, the following optional packages may be useful: • concurrent.futures [https://pypi.python.org/pypi/futures] is the recommended thread pool for use with Tornado and enables the use of ThreadedResolver concurrency tornado.gen — Simplify asynchronous code ○ tornado.concurrent — Work with threads and futures ☐ tornado.locks – Synchronization primitives tornado.queues – Queues for coroutines ☐ tornado my_future.set_result(f.result())) return my_future The raw Future version is more complex, but Futures are nonetheless recommended practice in Tornado because they have two major advantages. Error handling0 码力 | 333 页 | 322.34 KB | 2 年前3
Comprehensive Rust(English) 202412Concurrency: Afternoon 349 62 Welcome 350 63 Async Basics 351 63.1 async/await 351 63.2 Futures 352 63.3 Runtimes 352 63.3.1 Tokio 353 63.4 Tasks 354 64 Channels and Control Flow 355 scheduling using threads and mutexes) and async/await concurrency (cooperative multitasking using futures). ## Non-Goals Rust is a large language and we won't be able to cover all of it in a few days operation is based on "futures", which represent work that may be completed in the future. Futures are "polled" until they signal that they are complete. Futures are polled by an async runtime0 码力 | 382 页 | 1.00 MB | 1 年前3
Tornado 5.1 Documentation
in Tornado generally return placeholder objects (Futures), with the exception of some low-level components like the IOLoop that use callbacks. Futures are usually transformed into their result with the coroutines have additional integration with the concurrent.futures [https://docs.python.org/3.6/library/concurrent.futures.html#module-concurrent.futures] package, allowing the result of executor.submit to be way to call a blocking function from a coroutine is to use IOLoop.run in executor, which returns Futures that are compatible with coroutines: async def call_blocking(): await IOLoop.current().run_in_executor(None0 码力 | 359 页 | 347.32 KB | 2 年前3
Tornado 4.5 Documentation
automatically by pip or setup.py install, the following optional packages may be useful: • concurrent.futures is the recommended thread pool for use with Tornado and enables the use of ThreadedResolver. It is my_future.set_result(f.result())) return my_future The raw Future version is more complex, but Futures are nonetheless recommended practice in Tornado because they have two major advantages. Error handling exception (as opposed to the ad-hoc error handling common in callback-oriented interfaces), and Futures lend themselves well to use with coroutines. Coroutines will be discussed in depth in the next section0 码力 | 222 页 | 833.04 KB | 2 年前3
Tornado 6.0 Documentation
in Tornado generally return placeholder objects (Futures), with the exception of some low-level components like the IOLoop that use callbacks. Futures are usually transformed into their result with the coroutines: • have additional integration with the concurrent.futures [https://docs.python.org/3.6/library/concurrent.futures.html#module-concurrent.futures] package, allowing the result of executor.submit to be way to call a blocking function from a coroutine is to use IOLoop.run in executor, which returns Futures that are compatible with coroutines: async def call_blocking(): await IOLoop.current().run_in_executor(None0 码力 | 869 页 | 692.83 KB | 2 年前3
Tornado 6.4 Documentation
in Tornado generally return placeholder objects (Futures), with the exception of some low-level components like the IOLoop that use callbacks. Futures are usually transformed into their result with the coroutines: • have additional integration with the concurrent.futures [https://docs.python.org/3/library/concurrent.futures.html#module-concurrent.futures] package, allowing the result of executor.submit to be way to call a blocking function from a coroutine is to use IOLoop.run in executor, which returns Futures that are compatible with coroutines: async def call_blocking(): await IOLoop.current().run_in_executor(None0 码力 | 432 页 | 402.58 KB | 2 年前3
Tornado 6.4 Documentation
in Tornado generally return placeholder objects (Futures), with the exception of some low-level components like the IOLoop that use callbacks. Futures are usually transformed into their result with the coroutines: • have additional integration with the concurrent.futures [https://docs.python.org/3/library/concurrent.futures.html#module-concurrent.futures] package, allowing the result of executor.submit to be way to call a blocking function from a coroutine is to use IOLoop.run in executor, which returns Futures that are compatible with coroutines: async def call_blocking(): await IOLoop.current().run_in_executor(None0 码力 | 432 页 | 402.58 KB | 2 年前3
Tornado 6.4 Documentation
in Tornado generally return placeholder objects (Futures), with the exception of some low-level components like the IOLoop that use callbacks. Futures are usually transformed into their result with the coroutines: • have additional integration with the concurrent.futures [https://docs.python.org/3/library/concurrent.futures.html#module-concurrent.futures] package, allowing the result of executor.submit to be way to call a blocking function from a coroutine is to use IOLoop.run in executor, which returns Futures that are compatible with coroutines: async def call_blocking(): await IOLoop.current().run_in_executor(None0 码力 | 432 页 | 402.58 KB | 2 年前3
共 352 条
- 1
- 2
- 3
- 4
- 5
- 6
- 36
相关搜索词
Futures/PromisesActorsLazy ContinuationsEventualsSchedulingConcurrency in RustRustConcurrencyData RacesFuturestornado.webtornado.httpservertornado.iostreamtornado.concurrenttornado.websocketCargo类型和值控制流通道Tornado框架版本5.1弃用接口Python版本支持模块更新Tornado异步网络库Web框架长连接协程Tornado 6.0APIsDeprecationWarningPython 3.5.2native coroutinesTornado 6.4IOLoopHTTPClientWebSocketasyncioPython 3.8pycurllibcurltornado.httpclienttornado.iolooptornado.tcpclienttornado.testing













