Re: threading issues with D - C - Python

2014-12-17 Thread Ellery Newcomer via Digitalmars-d-learn
On 12/07/2014 03:12 PM, Michael wrote: now to figure out how to use them in the general case. This is great.. Thank you. I'm looking forward to being able to try the finished result. My build servers are broken at the moment, but I think I have this fixed, on linux at least.

Re: threading issues with D - C - Python

2014-12-08 Thread Michael via Digitalmars-d-learn
On Monday, 8 December 2014 at 01:17:16 UTC, Ellery Newcomer wrote: On 12/07/2014 03:12 PM, Michael wrote: On Saturday, 6 December 2014 at 00:40:49 UTC, Ellery Newcomer wrote: On 12/04/2014 10:55 PM, Ellery Newcomer wrote: I guess tomorrow I can try messing around with thread_attachThis, as

Re: threading issues with D - C - Python

2014-12-07 Thread Michael via Digitalmars-d-learn
On Saturday, 6 December 2014 at 00:40:49 UTC, Ellery Newcomer wrote: On 12/04/2014 10:55 PM, Ellery Newcomer wrote: I guess tomorrow I can try messing around with thread_attachThis, as the fullcollect happening in #2 might be screwing with python data. But you aren't really passing anything

Re: threading issues with D - C - Python

2014-12-07 Thread Ellery Newcomer via Digitalmars-d-learn
On 12/07/2014 03:12 PM, Michael wrote: On Saturday, 6 December 2014 at 00:40:49 UTC, Ellery Newcomer wrote: On 12/04/2014 10:55 PM, Ellery Newcomer wrote: I guess tomorrow I can try messing around with thread_attachThis, as the fullcollect happening in #2 might be screwing with python data.

Re: threading issues with D - C - Python

2014-12-05 Thread Ellery Newcomer via Digitalmars-d-learn
On 12/04/2014 10:55 PM, Ellery Newcomer wrote: I guess tomorrow I can try messing around with thread_attachThis, as the fullcollect happening in #2 might be screwing with python data. But you aren't really passing anything from python to d or vice versa, so I'm not sure why the gc would need to

Re: threading issues with D - C - Python

2014-12-04 Thread Michael via Digitalmars-d-learn
On Thursday, 4 December 2014 at 03:22:05 UTC, Ellery Newcomer wrote: dustmite? Not sure what went wrong with dustmite, but every time I tried it it just started deleting all the files in the directory and setup.py would give errors. I manually deleted a reasonable chunk of the code and I'm

Re: threading issues with D - C - Python

2014-12-04 Thread H. S. Teoh via Digitalmars-d-learn
On Thu, Dec 04, 2014 at 10:11:53PM +, Michael via Digitalmars-d-learn wrote: On Thursday, 4 December 2014 at 03:22:05 UTC, Ellery Newcomer wrote: dustmite? Not sure what went wrong with dustmite, but every time I tried it it just started deleting all the files in the directory and

Re: threading issues with D - C - Python

2014-12-04 Thread Ellery Newcomer via Digitalmars-d-learn
On 12/04/2014 02:11 PM, Michael wrote: On Thursday, 4 December 2014 at 03:22:05 UTC, Ellery Newcomer wrote: dustmite? Not sure what went wrong with dustmite, but every time I tried it it just started deleting all the files in the directory and setup.py would give errors. I manually deleted a

Re: threading issues with D - C - Python

2014-12-03 Thread Michael via Digitalmars-d-learn
On Wednesday, 3 December 2014 at 06:11:56 UTC, Ellery Newcomer wrote: are you looking at this pyd: https://bitbucket.org/ariovistus/pyd I'm looking at this one, which is what came up when googling python to D http://pyd.dsource.org/

Re: threading issues with D - C - Python

2014-12-03 Thread Michael via Digitalmars-d-learn
On Wednesday, 3 December 2014 at 06:30:07 UTC, Russel Winder via Digitalmars-d-learn wrote: As far as I can tell PyD is still active, but in a non-funded FOSS way, i.e. work happens as and when volunteers put time and effort in. I haven't tried PyD recently but it worked fine last time I did.

Re: threading issues with D - C - Python

2014-12-03 Thread ketmar via Digitalmars-d-learn
On Wed, 03 Dec 2014 20:41:46 + Michael via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On Wednesday, 3 December 2014 at 06:11:56 UTC, Ellery Newcomer wrote: are you looking at this pyd: https://bitbucket.org/ariovistus/pyd I'm looking at this one, which is what

Re: threading issues with D - C - Python

2014-12-03 Thread Michael via Digitalmars-d-learn
On Wednesday, 3 December 2014 at 21:35:48 UTC, ketmar via Digitalmars-d-learn wrote: ah, dsource strikes back! that vile site keep biting us again and again. let's hope that new admins will kill it for good. Yeah. I've got the new PyD and it compiles and does everything I want much nicer,

Re: threading issues with D - C - Python

2014-12-03 Thread Ellery Newcomer via Digitalmars-d-learn
On 12/03/2014 04:43 PM, Michael wrote: On Wednesday, 3 December 2014 at 21:35:48 UTC, ketmar via Digitalmars-d-learn wrote: ah, dsource strikes back! that vile site keep biting us again and again. let's hope that new admins will kill it for good. Yeah. I've got the new PyD and it compiles and

Re: threading issues with D - C - Python

2014-12-03 Thread Michael via Digitalmars-d-learn
On Thursday, 4 December 2014 at 02:31:51 UTC, Ellery Newcomer wrote: okay. that's not too surprising. If you can get me a minimal example, I'd be happy to have a look since pyd should probably support this case. Cool. Unfortunately most of the times I've attempted to reduce this down it

Re: threading issues with D - C - Python

2014-12-03 Thread Ellery Newcomer via Digitalmars-d-learn
On 12/03/2014 06:56 PM, Michael wrote: On Thursday, 4 December 2014 at 02:31:51 UTC, Ellery Newcomer wrote: okay. that's not too surprising. If you can get me a minimal example, I'd be happy to have a look since pyd should probably support this case. Cool. Unfortunately most of the times

threading issues with D - C - Python

2014-12-02 Thread Michael via Digitalmars-d-learn
Hi. I'm new here and this is my first post. I'm not sure this is the right subforum for it, but wasn't sure where else to put it either. I've written a library to talk to some external hardware using a socket. It uses the std.concurrency threads to send messages between the main D-object for

Re: threading issues with D - C - Python

2014-12-02 Thread ketmar via Digitalmars-d-learn
On Wed, 03 Dec 2014 01:07:42 + Michael via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: I'm fairly sure I have tackled both of these issues, but it still seems like Python threads and D threads don't mix well. When running the same functions from D, I am able to get no

Re: threading issues with D - C - Python

2014-12-02 Thread Michael via Digitalmars-d-learn
Thanks for this. Its definitely a step in the right direction. Would you mind explaining a bit more about the problem here, if you can? I don't fully understand why the garbage collector needs to know about the threads, and if so for how long does it need to know? If I put in

Re: threading issues with D - C - Python

2014-12-02 Thread ketmar via Digitalmars-d-learn
On Wed, 03 Dec 2014 02:21:45 + Michael via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Thanks for this. Its definitely a step in the right direction. Would you mind explaining a bit more about the problem here, if you can? I don't fully understand why the garbage

Re: threading issues with D - C - Python

2014-12-02 Thread Michael via Digitalmars-d-learn
On Wednesday, 3 December 2014 at 02:41:11 UTC, ketmar via Digitalmars-d-learn wrote: On Wed, 03 Dec 2014 02:21:45 + Michael via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Thanks for this. Its definitely a step in the right direction. Would you mind explaining a bit more

Re: threading issues with D - C - Python

2014-12-02 Thread ketmar via Digitalmars-d-learn
On Wed, 03 Dec 2014 02:52:27 + Michael via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Okay. Well I am already not passing any D-allocated data. I'm specifically creating variables/arrays on the C-stack, and then passing the pointer of that to D and overwriting the data

Re: threading issues with D - C - Python

2014-12-02 Thread ketmar via Digitalmars-d-learn
On Wed, 03 Dec 2014 02:52:27 + Michael via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: by using from C code i mean that your main program is not written in D, it has no D `main()` and so on. i.e. you wrote, for example, some .a library in D and now you want to use that

Re: threading issues with D - C - Python

2014-12-02 Thread ketmar via Digitalmars-d-learn
On Wed, 03 Dec 2014 01:07:42 + Michael via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: all in all, you'd better not mixing D code with alien mulththreaded code and not using .a/.so libraries written in D in another language until you are familiar with D runtime and GC. those

Re: threading issues with D - C - Python

2014-12-02 Thread ketmar via Digitalmars-d-learn
On Wed, 03 Dec 2014 01:07:42 + Michael via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: btw, Adam Ruppe's D Cookbook has a chapter which describes how to call D library from C code. don't remember if it describes threading, though. signature.asc Description: PGP signature

Re: threading issues with D - C - Python

2014-12-02 Thread Ellery Newcomer via Digitalmars-d-learn
On 12/02/2014 05:07 PM, Michael wrote: Hi. I'm new here and this is my first post. I'm not sure this is the right subforum for it, but wasn't sure where else to put it either. I've written a library to talk to some external hardware using a socket. It uses the std.concurrency threads to send

Re: threading issues with D - C - Python

2014-12-02 Thread Russel Winder via Digitalmars-d-learn
On Wed, 2014-12-03 at 01:07 +, Michael via Digitalmars-d-learn wrote: Hi. I'm new here and this is my first post. I'm not sure this is the right subforum for it, but wasn't sure where else to put it either. I've written a library to talk to some external hardware using a socket. It