PreviousUpNext

15.4.987  src/lib/src/threadkit-quickstring.pkg

## threadkit-quickstring-new.pkg
## Author: Matthias Blume (blume@tti-c.org)

# Compiled by:
#     src/lib/std/standard.lib



# Thread-safe version of Quickstring,
# protecting the global hashtable with a lock.


package threadkit_quickstring: (weak)  Quickstring {            # Quickstring   is from   src/lib/src/quickstring.api
    #
    include threadkit;                                          # threadkit     is from   src/lib/src/lib/thread-kit/src/core-thread-kit/threadkit.pkg

    include quickstring;                                        # quickstring   is from   src/lib/src/quickstring.pkg

    stipulate
        #
        lock = make_full_maildrop ();
        #
    herein

        fun atomically f a
            =
            {   empty lock;
                #
                f a
                before
                    fill (lock, ());
            };
    end;

    from_string    =  atomically  from_string;
    from_substring =  atomically  from_substring;
};


## Copyright (c) 2005 by The Fellowship of SML/NJ
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2012,
## released under Gnu Public Licence version 3.


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext