Hi
I would really like that we get a threadSafeTranscript so I coded one. If you can comment this would help me. Stef _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project ThreadSafeTranscript.st (10K) Download Attachment |
Stéphane Ducasse wrote:
> Hi > > I would really like that we get a threadSafeTranscript so I coded one. > If you can comment this would help me. > > Stef What is the difference tot he exisitng one, it has an access semaphore too. Keith _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
did you check what the semaphore critical section is protecting?
cr, tab, nextPutAll: and more and not protected. then transcriptStream inherits from stream which is not threadsafe, so everything can happen. I think that having a real thread safe output is a must. Stef On Mar 29, 2009, at 5:55 PM, Keith Hodges wrote: > Stéphane Ducasse wrote: >> Hi >> >> I would really like that we get a threadSafeTranscript so I coded >> one. >> If you can comment this would help me. >> >> Stef > What is the difference tot he exisitng one, it has an access > semaphore too. > > Keith > > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
2009/3/29 Stéphane Ducasse <[hidden email]>:
> did you check what the semaphore critical section is protecting? > cr, tab, nextPutAll: and more and not protected. > > then transcriptStream inherits from stream which is not threadsafe, so > everything can happen. > I think that having a real thread safe output is a must. > as well as thread-safe updating. Btw, take a look at the http://bugs.squeak.org/view.php?id=7033 The way how Transcript window updates itself is not safe. It should use deferUIMessage to update itself using regular world cycle. > Stef > > On Mar 29, 2009, at 5:55 PM, Keith Hodges wrote: > >> Stéphane Ducasse wrote: >>> Hi >>> >>> I would really like that we get a threadSafeTranscript so I coded >>> one. >>> If you can comment this would help me. >>> >>> Stef >> What is the difference tot he exisitng one, it has an access >> semaphore too. >> >> Keith >> >> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > -- Best regards, Igor Stasenko AKA sig. _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Igor
your change is already in pharo :) since months :) Stef On Mar 29, 2009, at 6:48 PM, Igor Stasenko wrote: > 2009/3/29 Stéphane Ducasse <[hidden email]>: >> did you check what the semaphore critical section is protecting? >> cr, tab, nextPutAll: and more and not protected. >> >> then transcriptStream inherits from stream which is not threadsafe, >> so >> everything can happen. >> I think that having a real thread safe output is a must. >> > > as well as thread-safe updating. > Btw, take a look at the http://bugs.squeak.org/view.php?id=7033 > > The way how Transcript window updates itself is not safe. It should > use deferUIMessage to update itself using regular world cycle. > >> Stef >> >> On Mar 29, 2009, at 5:55 PM, Keith Hodges wrote: >> >>> Stéphane Ducasse wrote: >>>> Hi >>>> >>>> I would really like that we get a threadSafeTranscript so I coded >>>> one. >>>> If you can comment this would help me. >>>> >>>> Stef >>> What is the difference tot he exisitng one, it has an access >>> semaphore too. >>> >>> Keith >>> >>> >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> >> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> > > > > -- > Best regards, > Igor Stasenko AKA sig. > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
2009/3/29 Stéphane Ducasse <[hidden email]>:
> Igor > your change is already in pharo :) > since months :) Yes, but method i changes is not related in particular to Transcript. The change applies to all users of PluggableTextMorph. But as for thread-safe transcript, you need to be careful when you sending #changed message (each time you printing something - it sends this message), because it using a notification mechanism to tell listeners that there is something changed. Maybe its worth adding #synchronousChanged method to Object which guards from entry by multiple threads(processes) simueltaneously. > Stef > On Mar 29, 2009, at 6:48 PM, Igor Stasenko wrote: > >> 2009/3/29 Stéphane Ducasse <[hidden email]>: >>> did you check what the semaphore critical section is protecting? >>> cr, tab, nextPutAll: and more and not protected. >>> >>> then transcriptStream inherits from stream which is not threadsafe, >>> so >>> everything can happen. >>> I think that having a real thread safe output is a must. >>> >> >> as well as thread-safe updating. >> Btw, take a look at the http://bugs.squeak.org/view.php?id=7033 >> >> The way how Transcript window updates itself is not safe. It should >> use deferUIMessage to update itself using regular world cycle. >> >>> Stef >>> >>> On Mar 29, 2009, at 5:55 PM, Keith Hodges wrote: >>> >>>> Stéphane Ducasse wrote: >>>>> Hi >>>>> >>>>> I would really like that we get a threadSafeTranscript so I coded >>>>> one. >>>>> If you can comment this would help me. >>>>> >>>>> Stef >>>> What is the difference tot he exisitng one, it has an access >>>> semaphore too. >>>> >>>> Keith >>>> >>>> >>>> >>>> _______________________________________________ >>>> Pharo-project mailing list >>>> [hidden email] >>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>>> >>> >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> >> >> >> >> -- >> Best regards, >> Igor Stasenko AKA sig. >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > -- Best regards, Igor Stasenko AKA sig. _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Oh, TrascriptStream already uses AccessSema..
So, it should wrap a #changed: with it: changed: param self semaphore critical: [ super changed: param ] 2009/3/29 Igor Stasenko <[hidden email]>: > 2009/3/29 Stéphane Ducasse <[hidden email]>: >> Igor >> your change is already in pharo :) >> since months :) > > Yes, but method i changes is not related in particular to Transcript. > The change applies to all users of PluggableTextMorph. > > But as for thread-safe transcript, you need to be careful when you > sending #changed message (each time you printing something - it sends > this message), because it using a notification mechanism to tell > listeners that there is something changed. > Maybe its worth adding #synchronousChanged method to Object > which guards from entry by multiple threads(processes) simueltaneously. > >> Stef >> On Mar 29, 2009, at 6:48 PM, Igor Stasenko wrote: >> >>> 2009/3/29 Stéphane Ducasse <[hidden email]>: >>>> did you check what the semaphore critical section is protecting? >>>> cr, tab, nextPutAll: and more and not protected. >>>> >>>> then transcriptStream inherits from stream which is not threadsafe, >>>> so >>>> everything can happen. >>>> I think that having a real thread safe output is a must. >>>> >>> >>> as well as thread-safe updating. >>> Btw, take a look at the http://bugs.squeak.org/view.php?id=7033 >>> >>> The way how Transcript window updates itself is not safe. It should >>> use deferUIMessage to update itself using regular world cycle. >>> >>>> Stef >>>> >>>> On Mar 29, 2009, at 5:55 PM, Keith Hodges wrote: >>>> >>>>> Stéphane Ducasse wrote: >>>>>> Hi >>>>>> >>>>>> I would really like that we get a threadSafeTranscript so I coded >>>>>> one. >>>>>> If you can comment this would help me. >>>>>> >>>>>> Stef >>>>> What is the difference tot he exisitng one, it has an access >>>>> semaphore too. >>>>> >>>>> Keith >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Pharo-project mailing list >>>>> [hidden email] >>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>>>> >>>> >>>> >>>> _______________________________________________ >>>> Pharo-project mailing list >>>> [hidden email] >>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>>> >>> >>> >>> >>> -- >>> Best regards, >>> Igor Stasenko AKA sig. >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> >> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> > > > > -- > Best regards, > Igor Stasenko AKA sig. > -- Best regards, Igor Stasenko AKA sig. _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Igor Stasenko
On Mar 29, 2009, at 7:05 PM, Igor Stasenko wrote: > 2009/3/29 Stéphane Ducasse <[hidden email]>: >> Igor >> your change is already in pharo :) >> since months :) > > Yes, but method i changes is not related in particular to Transcript. > The change applies to all users of PluggableTextMorph. > > But as for thread-safe transcript, you need to be careful when you > sending #changed message (each time you printing something - it sends > this message), because it using a notification mechanism to tell > listeners that there is something changed. > Maybe its worth adding #synchronousChanged method to Object > which guards from entry by multiple threads(processes) > simueltaneously. I see. I do not know how to do it but I will look into that. > > >> Stef >> On Mar 29, 2009, at 6:48 PM, Igor Stasenko wrote: >> >>> 2009/3/29 Stéphane Ducasse <[hidden email]>: >>>> did you check what the semaphore critical section is protecting? >>>> cr, tab, nextPutAll: and more and not protected. >>>> >>>> then transcriptStream inherits from stream which is not threadsafe, >>>> so >>>> everything can happen. >>>> I think that having a real thread safe output is a must. >>>> >>> >>> as well as thread-safe updating. >>> Btw, take a look at the http://bugs.squeak.org/view.php?id=7033 >>> >>> The way how Transcript window updates itself is not safe. It should >>> use deferUIMessage to update itself using regular world cycle. >>> >>>> Stef >>>> >>>> On Mar 29, 2009, at 5:55 PM, Keith Hodges wrote: >>>> >>>>> Stéphane Ducasse wrote: >>>>>> Hi >>>>>> >>>>>> I would really like that we get a threadSafeTranscript so I coded >>>>>> one. >>>>>> If you can comment this would help me. >>>>>> >>>>>> Stef >>>>> What is the difference tot he exisitng one, it has an access >>>>> semaphore too. >>>>> >>>>> Keith >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Pharo-project mailing list >>>>> [hidden email] >>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- >>>>> project >>>>> >>>> >>>> >>>> _______________________________________________ >>>> Pharo-project mailing list >>>> [hidden email] >>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>>> >>> >>> >>> >>> -- >>> Best regards, >>> Igor Stasenko AKA sig. >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> >> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> > > > > -- > Best regards, > Igor Stasenko AKA sig. > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Stéphane Ducasse
Stéphane Ducasse wrote:
> did you check what the semaphore critical section is protecting? > cr, tab, nextPutAll: and more and not protected. > > then transcriptStream inherits from stream which is not threadsafe, so > everything can happen. > I think that having a real thread safe output is a must. > > Stef > > please would you publish as an external package, perhaps Tools-Transcript thanks Keith _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Yes but I want to kill the old crappy one. so it cannot be an external
package :) On Mar 29, 2009, at 8:42 PM, Keith Hodges wrote: > Stéphane Ducasse wrote: >> did you check what the semaphore critical section is protecting? >> cr, tab, nextPutAll: and more and not protected. >> >> then transcriptStream inherits from stream which is not threadsafe, >> so >> everything can happen. >> I think that having a real thread safe output is a must. >> >> Stef >> >> > Excellent, > > please would you publish as an external package, perhaps Tools- > Transcript > > thanks > > Keith > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Btw, I also wrote a transcript (and workspace) as part of OB-Tools.
Lukas On Sun, Mar 29, 2009 at 9:24 PM, Stéphane Ducasse <[hidden email]> wrote: > Yes but I want to kill the old crappy one. so it cannot be an external > package :) > > On Mar 29, 2009, at 8:42 PM, Keith Hodges wrote: > >> Stéphane Ducasse wrote: >>> did you check what the semaphore critical section is protecting? >>> cr, tab, nextPutAll: and more and not protected. >>> >>> then transcriptStream inherits from stream which is not threadsafe, >>> so >>> everything can happen. >>> I think that having a real thread safe output is a must. >>> >>> Stef >>> >>> >> Excellent, >> >> please would you publish as an external package, perhaps Tools- >> Transcript >> >> thanks >> >> Keith >> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Stéphane Ducasse
On 3/30/09, Stéphane Ducasse <[hidden email]> wrote:
> Hi > > I would really like that we get a threadSafeTranscript so I coded one. > If you can comment this would help me. Personally, I'd replace the Transcript with a logging system. The global variable "Transcript" could be replaced with a logger wrapper. Gulik. -- http://gulik.pbwiki.com/ _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Michael van der Gulik wrote:
> On 3/30/09, Stéphane Ducasse <[hidden email]> wrote: > >> Hi >> >> I would really like that we get a threadSafeTranscript so I coded one. >> If you can comment this would help me. >> > > Personally, I'd replace the Transcript with a logging system. The > global variable "Transcript" could be replaced with a logger wrapper. > > Gulik. > "Logging"? Keith _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Stéphane Ducasse
Stéphane Ducasse wrote:
> Yes but I want to kill the old crappy one. so it cannot be an external > package :) > Why not? I thought that pharo was supposed to be modular. Keith _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
indeed the idea is that I do not want to see the old one around.
Stef On Mar 29, 2009, at 10:31 PM, Keith Hodges wrote: > Stéphane Ducasse wrote: >> Yes but I want to kill the old crappy one. so it cannot be an >> external >> package :) >> > Why not? I thought that pharo was supposed to be modular. > > Keith > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Michael van der Gulik-2
Yes could be good
So you would write what Logger default .... we could do the same for Transcript but breaks a lot of code and books. but indeed using a toothpick could be nice. Stef >> Hi >> >> I would really like that we get a threadSafeTranscript so I coded >> one. >> If you can comment this would help me. > > Personally, I'd replace the Transcript with a logging system. The > global variable "Transcript" could be replaced with a logger wrapper. > > Gulik. > > -- > http://gulik.pbwiki.com/ > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Stéphane Ducasse wrote:
> Yes could be good > > So you would write what > > Logger default .... > > we could do the same for Transcript but breaks a lot of code and > books. but indeed using a toothpick > could be nice. > > Stef self log as the front end, and backends are configured... LogCurrent default adapter add: Transcript. Where adapter returns LogAdapterSet, which can be one of multiple adapters, or nested sets. Adapters include File, Transcript, Syslog, Email, Toothpick, LogEngine Keith _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Free forum by Nabble | Edit this page |