Добавить
Уведомления

Fabio Labella and Concurrency - Contributor Spotlight

In the first of our contributor spotlight interviews, we talk to Fabio Labella about his Concurrency library: https://share.unison-lang.org/@systemfw/concurrent Fabio shares a ton of wisdom about working with concurrency in general, how his library relates to the existing concurrency primitives in the base standard library, how it compares to the Remote type for distributed programming, and a lot more. We cap off our interview with a live-coding session, writing a concurrent queue using the Signal type from the library. 00:00:00 Start 00:03:25 Fabio's tips for reading papers 00:06:25 What's hard about concurrency? 00:12:30 What does the concurrency library do? 00:13:53 Semispace cache 00:15:44 Concurrent Map 00:17:39 Signal 00:19:13 Comparison with primitives from base 00:20:43 Ref - modifying state in concurrency 00:21:22 Promise - for synchronization 00:21:46 Building on top of Ref and Promise 00:23:48 Concurrency vs Remote Tasks 00:26:34 Introducing the live-coding exercise 00:28:51 Starting with type signatures 00:33:42 Representation of queue 00:35:43 Writing the Queue.new function 00:36:36 Start writing enqueue and dequeue 00:42:13 Starting dequeue logic 00:48:43 Fixing the spinning logic 00:54:45 Writing a function that runs the queue 00:55:54 Writing the producer 01:01:12 Writing the consumer 01:08:20 Fixing the main thread prematurely exiting 01:12:48 Fixing the main thread with Promise 01:15:00 Removing the recursive call to logic 01:19:28 Closing

12+
14 просмотров
год назад
12+
14 просмотров
год назад

In the first of our contributor spotlight interviews, we talk to Fabio Labella about his Concurrency library: https://share.unison-lang.org/@systemfw/concurrent Fabio shares a ton of wisdom about working with concurrency in general, how his library relates to the existing concurrency primitives in the base standard library, how it compares to the Remote type for distributed programming, and a lot more. We cap off our interview with a live-coding session, writing a concurrent queue using the Signal type from the library. 00:00:00 Start 00:03:25 Fabio's tips for reading papers 00:06:25 What's hard about concurrency? 00:12:30 What does the concurrency library do? 00:13:53 Semispace cache 00:15:44 Concurrent Map 00:17:39 Signal 00:19:13 Comparison with primitives from base 00:20:43 Ref - modifying state in concurrency 00:21:22 Promise - for synchronization 00:21:46 Building on top of Ref and Promise 00:23:48 Concurrency vs Remote Tasks 00:26:34 Introducing the live-coding exercise 00:28:51 Starting with type signatures 00:33:42 Representation of queue 00:35:43 Writing the Queue.new function 00:36:36 Start writing enqueue and dequeue 00:42:13 Starting dequeue logic 00:48:43 Fixing the spinning logic 00:54:45 Writing a function that runs the queue 00:55:54 Writing the producer 01:01:12 Writing the consumer 01:08:20 Fixing the main thread prematurely exiting 01:12:48 Fixing the main thread with Promise 01:15:00 Removing the recursive call to logic 01:19:28 Closing

, чтобы оставлять комментарии