develooper Front page | perl.perl6.language | Postings from June 2002

A5: thread safety of matching

Thread Next
From:
David Whipp
Date:
June 5, 2002 16:54
Subject:
A5: thread safety of matching
Message ID:
F0DF160193C9D511B7110050DA8B7C24293B70@msexchange.intranet.fast-chip.com
As always, most of it is great. so only the niggles get discussed.

On page 7, the following example is given:

    $oldpos = pos $string;
    $string =~ m/... <( .pos == $oldpos )> .../;

This implies that match position is associated with the string. This worries
me. If 2 threads are matching on the same string (intuitively safe, because
matching is a read-only operation) then both threads may both attempt to set
..pos. This would be unfortunate.

Dave.

--
Dave Whipp, Senior Verification Engineer,
Fast-Chip inc., 950 Kifer Rd, Sunnyvale, CA. 94086
tel: 408 523 8071; http://www.fast-chip.com
Opinions my own; statements of fact may be in error. 


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About