Menu

#10 3051942 asynch patterns: research on java asynch

sprint 01
open
nobody
5
2010-08-24
2010-08-24
zmicer
No

Discussion

  • zmicer

    zmicer - 2010-08-25

    Just to share this concept:

    private static ThreadLocal<ModelResolver> threadInstance = new ThreadLocal<ModelResolver>();

    public static void setThreadInstance(final ModelResolver instance) {
    threadInstance.set(instance);
    }

     
  • zmicer

    zmicer - 2010-08-25

    Oh, forgot description. It allows to have one static instance per thread for multithreaded environments (results of evolution of static instances concept).

     

Log in to post a comment.