Jump to page: 1 2
Thread overview
Phobos v2 asynchronous IO
Apr 16
IGotD-
Apr 16
a11e99z
Apr 18
Suliman
Apr 16
IGotD-
Apr 16
IGotD-
April 16

Is there any planning or work to move Phobos towards natively asynchronous IO? Right now most IO is synchronous like you would expect from an API from the 90s. Time has moved on asynchronous IO should be standard.

This means that everything should be asynchronous, file streams, networking, anything that streams as standard. If this is implemented then we also can look into adding native asynchronous task support (like C# async).

April 16
On Saturday, 16 April 2022 at 10:19:22 UTC, IGotD- wrote:
> Is there any planning or work to move Phobos towards natively asynchronous IO? Right now most IO is synchronous like you would expect from an API from the 90s.

Windows 95 included native asynchronous I/O (and it is quite pleasant to use, this is probably what the api should be based on). These things aren't as new as you think lol

But I don't think there's any plans for Phobos at all.
April 16

On Saturday, 16 April 2022 at 10:19:22 UTC, IGotD- wrote:

>

This means that everything should be asynchronous, file streams, networking, anything that streams as standard. If this is implemented then we also can look into adding native asynchronous task support (like C# async).

I'd love it if we finally had a way forward on a proper, standard async framework to build off of.

However I can already see the endless bickering about extremely tiny details that people present as show stoppers (and of course the but muh -betterC @nogc nothrow pure const auto ref shared debate).

So maybe in 10 years once D decides to catch up with modern application development we might have a proposal ;)

Also, we couldn't even get something 'simple' like string interpolation into the language, so I have literally negative hope of native async/await being brought in.

(As much as it sounds like I'm bashing the language, it's still my favourite, and I bring it up way too much to my work colleagues)

April 16

On Saturday, 16 April 2022 at 13:41:17 UTC, SealabJaster wrote:

>

So maybe in 10 years once D decides to catch up with modern application development we might have a proposal ;)

Yes, that's why I bring this up because creating a good asych API is very difficult. That's why we should use Phobos v2 to play around with different solutions and hopefully it will converge into something good.

April 17
On 17/04/2022 4:17 AM, IGotD- wrote:
> On Saturday, 16 April 2022 at 13:41:17 UTC, SealabJaster wrote:
>>
>> So maybe in 10 years once D decides to catch up with modern application development we might have a proposal ;)
>>
> 
> Yes, that's why I bring this up because creating a good asych API is very difficult. That's why we should use Phobos v2 to play around with different solutions and hopefully it will converge into something good.

This shouldn't be done in Phobos. It can be done right now separately.

There is a lot of components to this, event loop, file handling, socket handling, thread handling, queues, timers, future.

The actual async/await type primitives are just syntax suger around that.

Its all on my todo list, but ya know, big list.
April 16

On Saturday, 16 April 2022 at 16:17:23 UTC, IGotD- wrote:

>

On Saturday, 16 April 2022 at 13:41:17 UTC, SealabJaster wrote:

>

So maybe in 10 years once D decides to catch up with modern application development we might have a proposal ;)

Yes, that's why I bring this up because creating a good asych API is very difficult. That's why we should use Phobos v2 to play around with different solutions and hopefully it will converge into something good.

Why wait for Phobos to get its act together? Put it up on dub and we can start playing around today.

April 16
On Saturday, 16 April 2022 at 13:08:51 UTC, Adam D Ruppe wrote:
> On Saturday, 16 April 2022 at 10:19:22 UTC, IGotD- wrote:
>> Is there any planning or work to move Phobos towards natively asynchronous IO? Right now most IO is synchronous like you would expect from an API from the 90s.
>
> Windows 95 included native asynchronous I/O (and it is quite pleasant to use, this is probably what the api should be based on). These things aren't as new as you think lol
>
> But I don't think there's any plans for Phobos at all.

You have a pointer to the Windows API you mention? Do you mean overlapped io?
April 16
On Saturday, 16 April 2022 at 17:17:57 UTC, Tobias Pankrath wrote:
> You have a pointer to the Windows API you mention? Do you mean overlapped io?

Yes. WriteFileEx and associated things.
April 16

On Saturday, 16 April 2022 at 16:25:16 UTC, Paul Backus wrote:

>

Why wait for Phobos to get its act together? Put it up on dub and we can start playing around today.

Because it should be an official async Phobos interface that other libraries can use. There already exist async libraries which are half done and maintained. Also you shouldn't be forced to pull some third party library for basic IO functionality.

April 16
On Saturday, 16 April 2022 at 17:29:41 UTC, Adam D Ruppe wrote:
> On Saturday, 16 April 2022 at 17:17:57 UTC, Tobias Pankrath wrote:
>> You have a pointer to the Windows API you mention? Do you mean overlapped io?
>
> Yes. WriteFileEx and associated things.

https://docs.microsoft.com/en-us/troubleshoot/windows/win32/asynchronous-disk-io-synchronous#asynchronous-io-still-appears-to-be-synchronous
« First   ‹ Prev
1 2