Ok sorry for the misunderstanding. So I take it multiple threads within a single process should work?
Thanks On May 17, 10:38 pm, Ayende Rahien <[email protected]> wrote: > Nabils,PHT is a local db, that is not going to work, you can't share data > between processes accessing the same file > > On Sun, May 17, 2009 at 10:36 PM, nabils <[email protected]> wrote: > > > Full code is below. Yes that is write each process will be accessing > > the same esent db. Is this not possible? > > > namespace ConsoleApplication1 > > { > > class Program > > { > > const string testDatabase = "test.esent"; > > > static void Main(string[] args) > > { > > 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); > > } > > } > > } > > } --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
