Cooperative Multitasking With Generators

Christopher Pitt (30.Jun.2017 at 10:45, 45 min)
Talk at Dutch PHP Conference 2017 (English - US)

Rating: 5 of 5

Part of writing asynchronous code in PHP is using extensions and services to offload processing. Another part is using core mechanics to structure traditionally synchronous code in new ways. That's where this talk comes in.

Generators were added in PHP 5.5. These were originally meant to add syntactic sugar on top of iterable structures, but some folks have learned how to use them to simulate interruptible functions.

We take a look at how generators can be used for iteration, and how iteration and interruptibility are two sides to the same coin. There's hand-on code, as I show you how to build a multitasking system in 100 lines of code. Finally we look at a few popular projects that use this mechanic to facilitate common programming tasks using interruptible functions.

Who are you?

Claim talk

Talk claims have been moved to the new Joind.in site.

Please login to the new site to claim your talk

Want to comment on this talk? Log in or create a new account or comment anonymously

Write a comment

 
Please note: you are not logged in and will be posting anonymously!
= three plus six

Comments

Rating: 4 of 5

30.Jun.2017 at 11:33 by Marcus Bointon (20 comments) via Web2 LIVE

Really interesting, great live coding, but I got a bit lost towards the end

Rating: 4 of 5

30.Jun.2017 at 12:18 by Pulkit Swarup (7 comments) via Web2 LIVE

Quite useful and interesting

Rating: 5 of 5

30.Jun.2017 at 15:10 by Ben Dechrai (32 comments) via Web2 LIVE

Chris's presentations are variably interesting, and his personality and presentation style make the information very digestible.

This talk was eye opening, in that it helped the audience look at readily available functionality, and how it can be used in perhaps unexpected or unintentional ways.

Rating: 5 of 5

30.Jun.2017 at 15:59 by Bas (11 comments) via Web2 LIVE

Great talk, Already working with generators, still learned a new thing! Thanks Chris


30.Jun.2017 at 23:41 by Pulkit Swarup (7 comments) via Web2 LIVE

The concept/topic was totally new to me, which made it interesting clubbed along with presentation skills of Chris. I would say I liked this talk the most.

Rating: 5 of 5

01.Jul.2017 at 16:07 by Eddy de Boer (20 comments) via Joind.in iPhone app

Ecellent talk, learned a lot about asynchronous calls/generators in php.

Rating: 5 of 5

01.Jul.2017 at 18:14 by James Titcumb (246 comments) via Web2 LIVE

Really awesome talk, loved it. Full of good content, well presented. Also thank you for helping me out figuring the async/await stuff after, really appreciate it when someone goes above and beyond the call of duty.

Rating: 4 of 5

01.Jul.2017 at 20:53 by Arjan van den Bos (27 comments) via Web2 LIVE

Although I already use generators for a while I heard some new things and use-cases. Great talk, excellent speaker!

Rating: 5 of 5

02.Jul.2017 at 12:06 by Peter Bouwdewijn (10 comments)

Food for thought! Nice examples and out of the box thinking

Rating: 5 of 5

02.Jul.2017 at 16:10 by Ramon de la Fuente (128 comments) via Web2 LIVE

I finally got to see a talk by Christopher after having followed some of his work through blogposts and twitter. Not disappointed!
Like the blogposts, the level was just right, and the slides very clear (I'd give an additional thumbs-up for the cool live-coding inside the slides if I could!). Totally made we want to check out AMPHP.
I usually look for a point of improvement as feedback, but that would be nit-picking at this point. Well done.

Rating: 5 of 5

03.Jul.2017 at 13:09 by Freek Van der Herten (56 comments) via Web2 LIVE

This was really an amazing talk. My favourite one that I've seen at this conference really.

The content was very interesting, and it was very well presented. I especially appreciated the hands on approach and all the enthusiasm.

Very well done!

Rating: 5 of 5

04.Jul.2017 at 13:27 by Thijs (49 comments) via Web2 LIVE

Great talk, enthusiastically delivery and great pace. Also +1 for the 10 standups at the beginning to keep every body up.

Rating: 5 of 5

10.Jul.2017 at 09:35 by Maarten van Middelaar (9 comments) via Web2 LIVE

Interesting and informative. I learned much about use cases for Generators. Thank you!

© Joind.in 2017