code_junkie

nHibernate session and multithreading

Nov 11th, 2011
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. Method()
  2. {
  3. ... persistence calls
  4. foreach(Thing..)
  5. {
  6. ...persistence calls for each thing (1)
  7. }
  8. ...
  9. }
  10.  
  11. Method()
  12. {
  13. ... persistence calls
  14. foreach(Thing..)
  15. {
  16. create a thingResolver object with some data
  17. open a new thread with thingResolver.Method (1)
  18. starts this thread
  19. }
  20. .. waits for finishing threads and continues
  21. }
Add Comment
Please, Sign In to add comment