by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 10:39
    dependabot-preview[bot] synchronize #1680
  • 10:39

    dependabot-preview[bot] on pip

    Bump ipython from 7.16.1 to 7.1… (compare)

  • 10:39
    dependabot-preview[bot] edited #1680
  • 10:37
    dependabot-preview[bot] edited #1680
  • 10:37

    dependabot-preview[bot] on pip

    (compare)

  • 10:37

    dependabot-preview[bot] on master

    Bump prompt-toolkit from 3.0.5 … Merge pull request #1682 from p… (compare)

  • 10:37
    dependabot-preview[bot] closed #1682
  • 10:28
    dependabot-preview[bot] labeled #1682
  • 10:28
    dependabot-preview[bot] opened #1682
  • 10:28

    dependabot-preview[bot] on pip

    Bump prompt-toolkit from 3.0.5 … (compare)

  • Aug 10 07:32

    dependabot-preview[bot] on pip

    (compare)

  • Aug 10 07:32

    dependabot-preview[bot] on master

    Bump sphinx from 3.1.1 to 3.2.0… Merge pull request #1681 from p… (compare)

  • Aug 10 07:32
    dependabot-preview[bot] closed #1681
  • Aug 10 07:22

    dependabot-preview[bot] on pip

    (compare)

  • Aug 10 07:22
    dependabot-preview[bot] closed #1663
  • Aug 10 07:22
    dependabot-preview[bot] labeled #1681
  • Aug 10 07:22
    dependabot-preview[bot] opened #1681
  • Aug 10 07:22

    dependabot-preview[bot] on pip

    Bump sphinx from 3.1.1 to 3.2.0… (compare)

  • Aug 10 06:15

    dependabot-preview[bot] on pip

    (compare)

  • Aug 10 06:15

    dependabot-preview[bot] on master

    Bump sphinx from 3.1.2 to 3.2.0… Merge pull request #224 from py… (compare)

matrixbot
@matrixbot
guilledk when you go back up it feels like you are flying
guilledk sure get into physics as well!!
Kyle Altendorf
@altendky
had a little fun designing the silicon for gates in some simulations in school. how far can you push the clock into analog looking responses and still act digitally...
matrixbot
@matrixbot
guilledk damn, would love to work on a machine I know 100%
guilledk even if it runs slow hehe
guilledk looking at the waffer of a modern cpu is insane
Kyle Altendorf
@altendky
talk to google. sounds like they have 100 slots for open source chip designs they'll build for free. :]
matrixbot
@matrixbot
guilledk sounds cool
guilledk on the hobby project to do list for sure
Kyle Altendorf
@altendky
side note, these chat platforms need to offer virtual guests to better support the chat system gateways that are inevitably developed.
Ross Rochford
@RossRochford_twitter
In case anyone is interested, I just refactored my directed-acyclic-graph task scheduler for Trio, so the code is now much easier to understand and debug: https://github.com/rossrochford/trio_graph_scheduler
NoskLo
@nosklo_gitlab
Gotta love trio guest mode
richardsheridan
@richardsheridan
:+1:
Royce Mitchell
@remdragon
on trio guest mode, is it possible to get a handle I can wait on instead of a WM_USER message?
Nathaniel J. Smith
@njsmith
@remdragon sorry, can you expand that?
Royce Mitchell
@remdragon
yeah sure. So I was doing some thinking while stuck in traffic and I wondered if there's a way to "wait" for the condition that GetMessage() wouldn't block. It looks like MsgWaitForMultipleObjectsEx() might allow me to do so. If so, that would be the perfect solution. I could in a single function wait for notification that either 1) there's a win32 event to be processed or 2) there's trio activity to process. Furthermore, WM_USER would be left available for application use.
plus I think it would take fewer lines of code than a WM_USER implementation
Royce Mitchell
@remdragon
create it with handle = kernel32.CreateEventEx ( None, None, 0, 0 ). when you need attention from the loop, trigger it with kernel32.SetEvent ( handle )
Royce Mitchell
@remdragon
looking at trio_guest_win32.py, that someone posted earlier, I think I can see how to modify it for an event
Nathaniel J. Smith
@njsmith
@remdragon I doubt that windows has any way to wait for (messages or objects)
But I think you can at least use a custom message type to avoid claiming WM_USER?
Royce Mitchell
@remdragon
@njsmith I already confirmed it in the documentation. Now I just need to test it.
Nathaniel J. Smith
@njsmith
@remdragon oh heh, my eye just completely skipped over the Msg in MsgWaitForMultipleObjectsEx. Apparently that's a thing, who knew.
Alex Grönholm
@agronholm
@njsmith can I solicit your assistance for a couple things? I'd like you to take a look at the proposed stream ABC hierarchy in anyio 2.0, and then I have a question about trio's TLS stream
this shouldn't take that much of your time, and I don't know anyone better to ask
for the rest of the upcoming PR series, I can have other people review them
I don't want to impose, so if you feel this is awkward for you or you don't have the time or energy, that's fine too
Nathaniel J. Smith
@njsmith
@agronholm I'm heading to bed, but send me the links and I'll try to take a look?
Alex Grönholm
@agronholm
Quentin Pradet
@pquentin
(it probably would have been easier to review if split in commits)
Royce Mitchell
@remdragon
@njsmith I've mocked up my first attempt at the message loop, would you be interested in looking at it?
Royce Mitchell
@remdragon
@njsmith it may not be shorter, but I think it definitely is less invasive on win32 application structure: https://gist.github.com/remdragon/6dd5c70455ff6f499336f4f192dec36b
Alex Grönholm
@agronholm
@pquentin I've already split my changes into meaningful units
I don't see how splitting those further into several commits makes it easier to review
at least I just look at the changed files as a whole
Alex Grönholm
@agronholm
I'm wondering why trio.socket.SocketType is a dummy class
it's a PITA when trying to make it work with static typing
richardsheridan
@richardsheridan
@remdragon event_loop never awaits anything from trio, won't it will block the trio guest event loop?
Mattia
@nocturn9x
@njsmith I have a question. In trio, both tasks that are spawned trough a nursery and awaited coroutines are cancellable. How do you achieve that? I guess that tasks that are spawned have a specific flag (like spawned=True) but how do you get coroutines that are called with the await syntax into task objects?
Royce Mitchell
@remdragon
@richardsheridan the way I understand guest mode it doesn't need to. trio will call run_sync_soon_threadsafe() with a callable when it needs attention. and the callable provided to that function doesn't need to be awaited. From what I can tell this complies with trio's guest mode, but I haven't tried it yet
I think trio probably does some task switching magic when it gets those callbacks
Royce Mitchell
@remdragon
I just tweaked it to remove the GetMessage(). After thinking about it, I don't think it's necessary, should make the whole thing use fewer cpu cycles.
Royce Mitchell
@remdragon
We could also make a simpler version that just returns a MSG object once one has been received. That way the function would act like a drop-in replacement for GetMessage() itself and app developers can still use their own win32 event loop logic. I think I could also emulate PeekMessage... hmm..
András Mózes
@mozesa
Hello, could you help me. Could be any drawback of using AsyncExitStack with Nursery?
I mean could something go wrong because of using AsyncExitStack with Nursery. I don't know how fragile nurseries are. :smile:
Matthias Urlichs
@smurfix
@mozesa I'm using that combination in a couple places. No problems so far.
András Mózes
@mozesa
@smurfix Good to hear that. Thanks!
Joshua Oreman
@oremanj
@mozesa It’s fine as long as you use the AsyncExitStack in a way that matches something you could theoretically do with a series of async with statements. But AsyncExitStack combined with async with statements allows you to express other patterns too, and some of those won’t work, like “enter nursery 1, enter nursery 2, leave nursery 1, leave nursery 2” in that order.
András Mózes
@mozesa
@oremanj :thumbsup: Great thanks