Behavior of singletons in task queues on app-engine
问题 What happens to my static variables when app-engine spins new instances? More specifically I am using a Task Queue that can have 40 instances/thread. Within the Servlet in question, I am using a singleton, as in public class WorkerThread extends HttpServlet { @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { .. MySingleton single = MySingleton.getInstance(); .. } ... } Here is how the singleton is created public