Is it safe to shre a reg exp object among threads?

Discussion in 'Python' started by overly.crazy.steve@gmail.com, Jun 29, 2006.

  1. Guest

    Let's say I construct a regular expression object r by:

    r = re.compile("some pattern")

    Is it safe to let multiple threads to use r concurrently (use r.search
    on different strings, etc.)?

    Thanks.
     
    , Jun 29, 2006
    #1
    1. Advertising

  2. wrote:

    > Let's say I construct a regular expression object r by:
    >
    > r = re.compile("some pattern")
    >
    > Is it safe to let multiple threads to use r concurrently (use r.search
    > on different strings, etc.)?


    yes.

    </F>
     
    Fredrik Lundh, Jun 29, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrew Rowland

    Reg exp: matching relative path only.

    Andrew Rowland, Aug 2, 2003, in forum: Perl
    Replies:
    0
    Views:
    1,155
    Andrew Rowland
    Aug 2, 2003
  2. psk

    Newbie-Reg Exp

    psk, Jan 16, 2004, in forum: Perl
    Replies:
    2
    Views:
    1,374
    Gunnar Hjalmarsson
    Jan 19, 2004
  3. PerlE

    Reg Exp Help

    PerlE, Jan 30, 2004, in forum: Perl
    Replies:
    0
    Views:
    517
    PerlE
    Jan 30, 2004
  4. Ken Chesak

    reg exp

    Ken Chesak, Aug 26, 2004, in forum: Perl
    Replies:
    0
    Views:
    636
    Ken Chesak
    Aug 26, 2004
  5. Ken Chesak

    reg exp

    Ken Chesak, Aug 30, 2004, in forum: Perl
    Replies:
    5
    Views:
    660
Loading...

Share This Page