Thread overview |
---|
February 05, 2004 wait() | ||||
---|---|---|---|---|
| ||||
Can somebody please tell me why the Thread in this class will not wait when requested? ----------------------------- class painter : Thread { void start(){ run(this); } void run(void* p){ theCanvas.penColor(200,200,100); for(int i = 0; i < 14; i++){ printf("ticking"); wait(1000); theCanvas.line(158,158, dot[i][0], dot[i][1]); } } } ------------------------------ I have done this wrong, but what is the correct way? Phill. |
February 06, 2004 Re: wait() | ||||
---|---|---|---|---|
| ||||
Posted in reply to Phill | Are you running linux or windows? "Phill" <phill@pacific.net.au> wrote in message news:bvsuv5$1k8p$1@digitaldaemon.com... > Can somebody please tell me why the Thread in > this class will not wait when requested? > ----------------------------- > class painter : Thread { > > > void start(){ > run(this); > } > > void run(void* p){ > > theCanvas.penColor(200,200,100); > > for(int i = 0; i < 14; i++){ > printf("ticking"); > wait(1000); > theCanvas.line(158,158, dot[i][0], dot[i][1]); > } > > } > > } > ------------------------------ > I have done this wrong, but what is > the correct way? > > Phill. > > > > |
February 06, 2004 Re: wait() | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | WindowsXP "Walter" <walter@digitalmars.com> wrote in message news:bvv2cq$20ca$1@digitaldaemon.com... > Are you running linux or windows? > > "Phill" <phill@pacific.net.au> wrote in message news:bvsuv5$1k8p$1@digitaldaemon.com... > > Can somebody please tell me why the Thread in > > this class will not wait when requested? > > ----------------------------- > > class painter : Thread { > > > > > > void start(){ > > run(this); > > } > > > > void run(void* p){ > > > > theCanvas.penColor(200,200,100); > > > > for(int i = 0; i < 14; i++){ > > printf("ticking"); > > wait(1000); > > theCanvas.line(158,158, dot[i][0], dot[i][1]); > > } > > > > } > > > > } > > ------------------------------ > > I have done this wrong, but what is > > the correct way? > > > > Phill. > > > > > > > > > > |
February 06, 2004 Re: wait() | ||||
---|---|---|---|---|
| ||||
Posted in reply to Phill | Take a look at the source to std.thread.wait(). Maybe put a printf in there and see what's happening. "Phill" <phill@pacific.net.au> wrote in message news:bvv2ge$20j1$1@digitaldaemon.com... > WindowsXP > > > "Walter" <walter@digitalmars.com> wrote in message news:bvv2cq$20ca$1@digitaldaemon.com... > > Are you running linux or windows? > > > > "Phill" <phill@pacific.net.au> wrote in message news:bvsuv5$1k8p$1@digitaldaemon.com... > > > Can somebody please tell me why the Thread in > > > this class will not wait when requested? > > > ----------------------------- > > > class painter : Thread { > > > > > > > > > void start(){ > > > run(this); > > > } > > > > > > void run(void* p){ > > > > > > theCanvas.penColor(200,200,100); > > > > > > for(int i = 0; i < 14; i++){ > > > printf("ticking"); > > > wait(1000); > > > theCanvas.line(158,158, dot[i][0], dot[i][1]); > > > } > > > > > > } > > > > > > } > > > ------------------------------ > > > I have done this wrong, but what is > > > the correct way? > > > > > > Phill. > > > > > > > > > > > > > > > > > > |
February 07, 2004 Re: wait() | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | I dont know of a way to do this(rebuild phobos) because I dont have a FAT32 file sys, I have NTFS and apparently there is another file called "SC" on my PC that is being called instead of your "SC". I think it is somthing to do with the NT file sys. I am correct is assuming that I would have to rebuild phobos? Phill. "Walter" <walter@digitalmars.com> wrote in message news:bvv7mn$2a1m$1@digitaldaemon.com... > Take a look at the source to std.thread.wait(). Maybe put a printf in there > and see what's happening. > > "Phill" <phill@pacific.net.au> wrote in message news:bvv2ge$20j1$1@digitaldaemon.com... > > WindowsXP > > > > > > "Walter" <walter@digitalmars.com> wrote in message news:bvv2cq$20ca$1@digitaldaemon.com... > > > Are you running linux or windows? > > > > > > "Phill" <phill@pacific.net.au> wrote in message news:bvsuv5$1k8p$1@digitaldaemon.com... > > > > Can somebody please tell me why the Thread in > > > > this class will not wait when requested? > > > > ----------------------------- > > > > class painter : Thread { > > > > > > > > > > > > void start(){ > > > > run(this); > > > > } > > > > > > > > void run(void* p){ > > > > > > > > theCanvas.penColor(200,200,100); > > > > > > > > for(int i = 0; i < 14; i++){ > > > > printf("ticking"); > > > > wait(1000); > > > > theCanvas.line(158,158, dot[i][0], dot[i][1]); > > > > } > > > > > > > > } > > > > > > > > } > > > > ------------------------------ > > > > I have done this wrong, but what is > > > > the correct way? > > > > > > > > Phill. > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
February 07, 2004 Re: Rebuilding phobos (was wait()) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Phill | Phill wrote: > I dont know of a way to do this(rebuild phobos) > because I dont have a FAT32 file sys, I have NTFS > and apparently there is another file called "SC" > on my PC that is being called instead of your > "SC". I think it is somthing to do with the NT > file sys. I doubt it's a FAT vs NTFS issue, anything is possible. My suspicion is that need to adjust your path. Have you checked your path yet? Since you're on XP, I won't bother talking about "autoexec.bat". Right-click on "My Computer". Click on "Properties". Click on the "Advanced" tab. Click on the "Environment Variables". In the "System variables" frame, there should be an entry called "Path". Put c:\dm\bin;c:\dmd\bin; at the front of the list and see if the right SC is found. I don't know if this will help you, but it solved my problem with my computer running the wrong make in the past. (My apologies for being useful and condescending if you've already done this. :) ) By the way, I've had various problems rebuilding phobos, too. I've succeeded once or twice, but the other times -- well, I got frustrated and gave up. I guess I need to be more stubborn. > I am correct is assuming that I would have to > rebuild phobos? Yep. > > Phill. -- Justin http://jcc_7.tripod.com/d/ |
February 07, 2004 Re: Rebuilding phobos (was wait()) | ||||
---|---|---|---|---|
| ||||
Posted in reply to J C Calvarese | It states it in the error that it is an NT process or similar. Anyway: I thought of that, but I didnt want to do it because im not sure what the other SC is for and I didnt want dm's SC to be called to do the task's of the other(if you know what I mean). So I changed the partition back to FAT32 and reformatted my HD. I will try to rebuild phobos later tonight. If anyone else out there, has XP on a NTFS are you able rebuilt phobos on your sys? I would definetely prefer a NTFS system. Thanks Phill. "J C Calvarese" <jcc7@cox.net> wrote in message news:c021d0$11up$1@digitaldaemon.com... > Phill wrote: > > I dont know of a way to do this(rebuild phobos) > > because I dont have a FAT32 file sys, I have NTFS > > and apparently there is another file called "SC" > > on my PC that is being called instead of your > > "SC". I think it is somthing to do with the NT > > file sys. > > I doubt it's a FAT vs NTFS issue, anything is possible. My suspicion is that need to adjust your path. Have you checked your path yet? > > Since you're on XP, I won't bother talking about "autoexec.bat". Right-click on "My Computer". Click on "Properties". Click on the "Advanced" tab. Click on the "Environment Variables". In the "System variables" frame, there should be an entry called "Path". Put c:\dm\bin;c:\dmd\bin; at the front of the list and see if the right SC is found. I don't know if this will help you, but it solved my problem with my computer running the wrong make in the past. > > (My apologies for being useful and condescending if you've already done > this. :) ) > > By the way, I've had various problems rebuilding phobos, too. I've succeeded once or twice, but the other times -- well, I got frustrated and gave up. I guess I need to be more stubborn. > > > I am correct is assuming that I would have to > > rebuild phobos? > > Yep. > > > > > Phill. > -- > Justin > http://jcc_7.tripod.com/d/ |
February 08, 2004 Re: Rebuilding phobos (was wait()) | ||||
---|---|---|---|---|
| ||||
Posted in reply to J C Calvarese | FYI this is what the other SC is: ------------------------------------------- SC Communicates with the Service Controller and installed services. SC.exe retrieves and sets control information about services. You can use SC.exe for testing and debugging service programs. Service properties stored in the registry can be set to control how service applications are started at boot time and run as background processes. SC.exe parameters can configure a specific service, retrieve the current status of a service, as well as stop and start a service. You can create batch files that call various SC.exe commands to automate the startup or shutdown sequence of services. SC.exe provides capabilities similar to Services in the Administrative Tools item in Control Panel. ------------------------------------ Thanks Phill. "J C Calvarese" <jcc7@cox.net> wrote in message news:c021d0$11up$1@digitaldaemon.com... > Phill wrote: > > I dont know of a way to do this(rebuild phobos) > > because I dont have a FAT32 file sys, I have NTFS > > and apparently there is another file called "SC" > > on my PC that is being called instead of your > > "SC". I think it is somthing to do with the NT > > file sys. > > I doubt it's a FAT vs NTFS issue, anything is possible. My suspicion is that need to adjust your path. Have you checked your path yet? > > Since you're on XP, I won't bother talking about "autoexec.bat". Right-click on "My Computer". Click on "Properties". Click on the "Advanced" tab. Click on the "Environment Variables". In the "System variables" frame, there should be an entry called "Path". Put c:\dm\bin;c:\dmd\bin; at the front of the list and see if the right SC is found. I don't know if this will help you, but it solved my problem with my computer running the wrong make in the past. > > (My apologies for being useful and condescending if you've already done > this. :) ) > > By the way, I've had various problems rebuilding phobos, too. I've succeeded once or twice, but the other times -- well, I got frustrated and gave up. I guess I need to be more stubborn. > > > I am correct is assuming that I would have to > > rebuild phobos? > > Yep. > > > > > Phill. > -- > Justin > http://jcc_7.tripod.com/d/ |
Copyright © 1999-2021 by the D Language Foundation