Closed veksha closed 2 years ago
Are you using this for a Windows app?
yes, I am planning to use it for a windows app. is it possible technically to parallelize requests correctly on windows with help of puppy lib?
https://github.com/khchen/winim/issues/71
I wanted to create a pull request for this library, to rewrite stuff and make it better. However, this does not solve the issue linked above.
As you see, the Windows thing has some GC safety bug, as pointed out by winim
's great author.
So, if you want to have a workaround for the GC safety, then you have to apply the workaround I lined out in that linked issue.
So, if you want to have a workaround for the GC safety, then you have to apply the workaround I lined out in that linked issue.
@theAkito, can you tell me what do you mean by this:
Somehow, no matter how I tried to use it like that, it never worked with more than a single line. If I added a second line, or more, then it always errored out.
does it mean {.cast(gcsafe).}:
block is not working for you? (did you forget "cast"?)
One needs to figure make sure its gcsafe for both the windows api and the linux/mac libcurl api. libcurl api does strange things with strings.
Didn't use Linux thing, yet. But the Windows thing was pretty broken.
does it mean
{.cast(gcsafe).}:
block is not working for you? (did you forget "cast"?)
Nothing of that sort worked. It simply did not accept multiple lines, only single ones. Just as I described in the linked issue.
That, however, does not matter much. The actual problem is the specious lack of GC safety.
Puppy no longer has any dependencies which were the source of the concern here. All 3 platform fetch
implementations now have also been used and tested in a threaded context: https://github.com/treeform/puppy/blob/master/src/puppy/requestpools.nim and https://github.com/treeform/puppy/blob/master/tests/test_requestpools.nim
This should now work and be safe, excluding the usual pile of threading concerns that cannot be avoided. Please re-open if there are concerns or bugs.
Hi. thanks for this neat library. is it possible to make it gcsafe? so we can use it with "parallel block" (do a lot of requests in parallel). I'm using {.cast(gcsafe).} block to disable compiler errors and I think it is working fine (not tested on a real project yet)