[squeak-dev] Re: CurrentReadOnlySourceFiles annoys me ...

Eliot Miranda eliot.miranda at gmail.com
Sat Dec 19 03:11:45 UTC 2015


Hi Levente,

On Fri, Dec 18, 2015 at 4:05 PM, Levente Uzonyi <leves at caesar.elte.hu>
wrote:

> Hi Eliot,
>
> I don't remember the exact case which made the Pharo guys do this change,
> but if you implement a web service, which shows source code on a web page,
> and reads the code from the image, then a non-UI process will read the
> source code from SourceFiles, which can lead to the problems I've
> described. IIRC Seaside has such example service.


For this I'd be tempted to implement something like
withClonedReadOnlySourceFilesDuring: that installs a new read-only copy for
the extent of a block, sort of analogous to deferred UI actions.  The
requirement would be that any accessor of source outside of normal user
(IDE) priority would use it.  What do you think, worse than the disease, or
acceptable?


>
>
> Levente
>
> On Wed, 16 Dec 2015, Eliot Miranda wrote:
>
> Hi Levente,
>> On Wed, Dec 16, 2015 at 2:43 PM, Levente Uzonyi <leves at caesar.elte.hu>
>> wrote:
>>       My objection is that concurrent access of the read-only source
>> files would cause race conditions.
>>       We might simplify the thing by using the regular source files (or
>> some shared read-only copies) when requested from the UI process, and
>> create a read-only copy for all other processes. That would cover most
>> potential slow-downs in the Trunk.
>>
>>
>> Apart form the debugger can you think of situations in which this will
>> really happen?  I can't. If you can convince me that concurrent access is a
>> real danger then I'll think again, but in all my time doing Smalltalk with
>> Smalltalk-80 v2, with VisualWorks and with
>> Croquet, Squeak and Pharo the only time this has been an issue was in the
>> debugger debugging source file access.  Given that that's easy to solve I
>> don't see the point of living with such slow source file access for any
>> longer :-)
>>
>>
>>
>>
>>       Levente
>>
>>       On Wed, 16 Dec 2015, Eliot Miranda wrote:
>>
>>             Hi all,
>>
>>                IMO we don't need CurrentReadOnkySourceFiles, instead we
>> should have SourceFilesArray maintain one read-only copy per source file.
>> The objection is that using a single file will make debugging source file
>> access break, since the debuggers
>>             own access to source will perturb the source files whose
>> access is being debugged, but the debugger can easily temporarily install a
>> different read-init copy whenever it accesses source, insulating the
>> debugged code from this effect.
>>
>>             _,,,^..^,,,_ (phone)
>>
>>                   On Dec 16, 2015, at 4:38 AM, marcel.taeumel <
>> Marcel.Taeumel at hpi.de> wrote:
>>
>>                   I want to catch all exceptions because it is kind of
>> test code where only
>>                   success matters. :-)  It is an experiment where the
>> participants should
>>                   program stuff and receive a green tick whenever the
>> task is accomplished.
>>                   Raising a debugger when the participant puts a "self
>> halt" or anything into
>>                   the control flow of the test code would confuse the
>> participant.
>>
>>                   Conceptionally, CurrentReadOnlySourceFiles is no kind
>> of an exception. Thank
>>                   you for the explanation. Can you sketch the steps to
>> transform that into a
>>                   PLV? Why would it take some effort?
>>
>>                   Bset,
>>                   Marcel
>>
>>
>>
>>                   --
>>                   View this message in context:
>> http://forum.world.st/CurrentReadOnlySourceFiles-annoys-me-tp4867253p4867327.html
>>                   Sent from the Squeak - Dev mailing list archive at
>> Nabble.com.
>>
>>
>>
>>
>>
>>
>>
>> --
>> _,,,^..^,,,_
>> best, Eliot
>>
>>
>
>
>


-- 
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20151218/532fb3cc/attachment-0001.htm


More information about the Squeak-dev mailing list