Re: ddbc with Vibe-d

2023-02-13 Thread Steve via Digitalmars-d-learn
On Monday, 13 February 2023 at 01:43:38 UTC, Steven Schveighoffer wrote: I think it needs to be immutable if it's a reference. -Steve I have tested args with isWeaklyIsolated!(typeof(arg)) and it looks like good news 👍️ Thanks for your help, Steve.

Re: ddbc with Vibe-d

2023-02-12 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/12/23 3:29 PM, Steve wrote: In my case args will just be the body of the HTTPServerRequest which is JSON. How can I get that JSON and pass it to async() in a manner that ensures I get a worker thread? I think it needs to be immutable if it's a reference. -Steve

Re: ddbc with Vibe-d

2023-02-12 Thread Steve via Digitalmars-d-learn
On Sunday, 12 February 2023 at 19:38:47 UTC, Steven Schveighoffer wrote: That might work, depending on args. As documented in the API, if anything in args are mutable references, then it is run as a task, and the same problem still applies (it will use a fiber, and count on the concurrency of v

Re: ddbc with Vibe-d

2023-02-12 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/12/23 1:01 PM, Steve wrote: On Sunday, 12 February 2023 at 15:24:14 UTC, Steven Schveighoffer wrote: Any synchronous calls will just be synchronous. They aren't going to participate in the async i/o that vibe uses. In other words, when you block on a call to sqlite, it will block everyth

Re: ddbc with Vibe-d

2023-02-12 Thread Steve via Digitalmars-d-learn
On Sunday, 12 February 2023 at 15:24:14 UTC, Steven Schveighoffer wrote: Any synchronous calls will just be synchronous. They aren't going to participate in the async i/o that vibe uses. In other words, when you block on a call to sqlite, it will block everything else in your web server until

Re: ddbc with Vibe-d

2023-02-12 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/12/23 6:05 AM, Steve wrote: Hi, I'm trying D for the first time and so far I'm really impressed with both D and vibe-d. My test project is an application server and I want to use SQLite3 as its database. I understand Vibe.d uses an async model under the hood and so my question is are V