Switched to the below and still got the same error? Do I need to
handle the locking myself?

public class Program
    {
        private const string testDatabase = "test.esent";

        private static void Main(string[] args)
        {
            for (int j = 0; j < 2; j++)
            {
                var thread = new Thread(x =>
                {
                    for (int i = 0; i < 50000; i++)
                    {
                        var guid = Guid.NewGuid().ToString();

                        using (var table = new PersistentHashTable
(testDatabase))
                        {
                            table.Initialize();
                            table.Batch(actions =>
                            {
                                actions.Put(new PutRequest
                                {
                                    Key = guid,
                                    IsReadOnly = true,
                                    ParentVersions = new ValueVersion
[0],
                                    Bytes = Encoding.ASCII.GetBytes
("This is a test string")
                                });
                                actions.Commit();
                            });
                        }
                        Console.WriteLine(guid);
                        Thread.Sleep(1000);
                    }
                });
                thread.Start();
            }
        }
    }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Rhino Tools Dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rhino-tools-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to