Search Results

Search found 10004 results on 401 pages for 'thread pool'.

Page 12/401 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Troubleshooting Nonpaged and Paged Pool Errors in Windows

    Ben Lye uncovered a memory leak in the nonpaged pool which was crashing his servers with disquieting regularity. Luckily it was relatively easy to troubleshoot, and he's sharing the tools and techniques he used to get his servers back on track in double-quick time....Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Error occurred in deployment step 'Recycle IIS Application Pool'

    - by shehan
    Encountered this error while trying to deploy a SharePoint 2010 project from Visual Studio 2010:Error occurred in deployment step 'Recycle IIS Application Pool': The open operation did not complete within the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout.All my other projects in the solution deploy just fine. To fix this, I had to retract the offending project (through Visual Studio) and re-deploy.

    Read the article

  • Patent Pool to Thwart Open Source Codecs

    <b>DaniWeb:</b> "Just when you thought it couldn't get any worse in the world of software patents, a reliable source sent me this response from Steve Jobs about a patent pool that's forming and aiming to nail the open source codecs projects."

    Read the article

  • Synchronizing issue: I want the main thread to be run before another thread but it sometimes doesn´t

    - by Rox
    I have done my own small concurrency framework (just for learning purposes) inspired by the java.util.concurrency package. This is about the Callable/Future mechanism. My code below is the whole one and is compilable and very easy to understand. My problem is that sometimes I run into a deadlock where the first thread (the main thread) awaits for a signal from the other thread. But then the other thread has already notified the main thread before the main thread went into waiting state, so the main thread cannot wake up. FutureTask.get() should always be run before FutureTask.run() but sometimes the run() method (which is called by new thread) runs before the get() method (which is called by main thread). I don´t know how I can prevent that. This is a pseudo code of how I want the two threads to be run. //From main thread: Executor.submit().get() (in get() the main thread waits for new thread to notify) ->submit() calls Executor.execute(FutureTask object) -> execute() starts new thread -> new thread shall notify `main thread` I cannot understand how the new thread can start up and run faster than the main thread that actually starts the new thread. Main.java: public class Main { public static void main(String[] args) { new ExecutorServiceExample(); } public Main() { ThreadExecutor executor = new ThreadExecutor(); Integer i = executor.submit(new Callable<Integer>() { @Override public Integer call() { return 10; } }).get(); System.err.println("Value: "+i); } } ThreadExecutor.java: public class ThreadExecutor { public ThreadExecutor() {} protected <V> RunnableFuture<V> newTaskFor(Callable c) { return new FutureTask<V>(c); } public <V> Future<V> submit(Callable<V> task) { if (task == null) throw new NullPointerException(); RunnableFuture<V> ftask = newTaskFor(task); execute(ftask); return ftask; } public void execute(Runnable r) { new Thread(r).start(); } } FutureTask.java: import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.ReentrantLock; import java.util.logging.Level; import java.util.logging.Logger; public class FutureTask<V> implements RunnableFuture<V> { private Callable<V> callable; private volatile V result; private ReentrantLock lock = new ReentrantLock(); private Condition condition = lock.newCondition(); public FutureTask(Callable callable) { if (callable == null) throw new NullPointerException(); this.callable = callable; } @Override public void run() { acquireLock(); System.err.println("RUN"+Thread.currentThread().getName()); V v = this.callable.call(); set(v); condition.signal(); releaseLock(); } @Override public V get() { acquireLock(); System.err.println("GET "+Thread.currentThread().getName()); try { condition.await(); } catch (InterruptedException ex) { Logger.getLogger(FutureTask.class.getName()).log(Level.SEVERE, null, ex); } releaseLock(); return this.result; } public void set(V v) { this.result = v; } private void acquireLock() { lock.lock(); } private void releaseLock() { lock.unlock(); } } And the interfaces: public interface RunnableFuture<V> extends Runnable, Future<V> { @Override void run(); } public interface Future<V> { V get(); } public interface Callable<V> { V call(); }

    Read the article

  • Have main thread wait for a boost thread complete a task (but not finish).

    - by JAKE6459
    I have found plenty on making one thread wait for another to finish executing before continuing, but that is not what I wanted to do. I am not very familiar with using any multi-threading apis but right now I'm trying to learn boost. My situation is that I am using my main thread (the starting one from int main()) to create an instance of a class that is in charge of interacting with the main GUI. A class function is then called that creates a boost thread which in turn creates the GUI and runs the message pump. The thing I want to do is when my main thread calls the classes member function to create the GUI, I don't want that function to return until I tell it to from the newly created thread. This way my main thread can't continue and call more functions from the GUI class that interact with the GUI thread until that thread has completed GUI creation and entered the message loop. I think I may be able to figure it out if it was multiple boost thread objects interacting with each other, but when it is the main thread (non-boost object) interacting with a boost thread object, I get lost. Eventually I want a loop in my main thread to call a class function (among other tasks) to check if the user as entered any new input into the GUI (buy any changes detected by the message loop being updated into a struct and changing a bool to tell the main thread in the class function a change has occurred). Any suggestions for any of this would be greatly appreciated. This is the member function called by the main thread. int ANNGUI::CreateGUI() { GUIMain = new Main(); GUIThread = new boost::thread(boost::bind(&Main::MainThreadFunc, GUIMain)); return 0; }; This is the boost thread starting function. void Main::MainThreadFunc() { ANNVariables = new GUIVariables; WndProc = new WindowProcedure; ANNWindowsClass = new WindowsClass(ANNVariables, WndProc); ANNWindow = new MainWindow(ANNVariables); GUIMessagePump = new MessagePump; ANNWindow-ShowWindows(); while(true) { GUIMessagePump-ProcessMessage(); } }; BTW, everything compiles fine and when I run it, it works I just put a sleep() in the main thread so I can play with the GUI a little.

    Read the article

  • A process serving application pool 'X' reported a failure. The process id was 'Y'. The data field c

    - by born to hula
    I have a WCF Web Service which is kept under an Application Pool on IIS. Lately I've been getting "Service Unavaiable" when I'm trying to make calls to this Web Service. The first thing I tried to do was restarting the Application Pool. I did it and after a couple of seconds, it crashed and stopped. Looking at the Event Viewer, I found these messages, which by the moment couldn't help me to find where the problem is. A process serving application pool 'X' reported a failure. The process id was '11616'. The data field contains the error number. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. After getting a couple of these, I got this one: Application pool 'X' is being automatically disabled due to a series of failures in the process(es) serving that application pool. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. I've already checked permissions and Application Pool configurations but everything seems to be OK. Have anyone been through this? Thanks in advance.

    Read the article

  • Identity.Name is disposed in a IIS7 Asp.NET MVC application Thread

    - by vIceBerg
    I have made the smallest demo project to illustrate my problem. You can download the sources Here Visual Studio 2008, .NET 3.5, IIS7, Windows 7 Ultimate 32 bits. The IIS Website is configured ONLY for Windows Authentication in an Integreated pipeline app pool (DefaultAppPool). Here's the problem. I have an Asp.NET MVC 2 application. In an action, I start a thread. The View returns. The thread is doing it's job... but it needs to access Thread.CurrentPrincipal.Identity.Name BANG The worker process of IIS7 stops. I have a window that says: "Visual Studio Just-In-Time Debugger An unhandled exception ('System.Object.DisposedException') occured in w3wp.exe [5524]" I checked with the debugger and the Thread.CurrentPrincipal.Identity is valid, but the Name property is disposed. If I put a long wait in the action before it returns the view, then the Thread can do it's job and the Identity.Name is not disposed. So I think the Name gets disposed when the view is returned. For the sake of the discussion, here's the code that the thread runs (but you can also download the demo project. The link is on top of this post): private void Run() { const int SECTOWAIT = 3; //wait SECTOWAIT seconds long end = DateTime.Now.Ticks + (TimeSpan.TicksPerSecond * SECTOWAIT); while (DateTime.Now.Ticks <= end) continue; //Check the currentprincipal. BANG!!!!!!!!!!!!! var userName = Thread.CurrentPrincipal.Identity.Name; } Here's the code that starts the thread public void Start() { Thread thread = new Thread(new ParameterizedThreadStart(ThreadProc)); thread.SetApartmentState(ApartmentState.MTA); thread.Name = "TestThread"; thread.Start(this); } static void ThreadProc(object o) { try { Builder builder = (Builder)o; builder.Run(); } catch (Exception ex) { throw; } } So... what am i doing wrong? Thanks

    Read the article

  • Pass a Message From Thread to Update UI

    - by Jay Dee
    Ive created a new thread for a file browser. The thread reads the contents of a directory. What I want to do is update the UI thread to draw a graphical representation of the files and folders. I know I can't update the UI from within a new thread so what I want to do is: whilst the file scanning thread iterates through a directories files and folders pass a file path string back to the UI thread. The handler in the UI thread then draws the graphical representation of the file passed back. public class New_Project extends Activity implements Runnable { private Handler handler = new Handler() { @Override public void handleMessage(Message msg) { Log.d("New Thread","Proccess Complete."); Intent intent = new Intent(); setResult(RESULT_OK, intent); finish(); } }; public void getFiles(){ //if (!XMLEFunctions.canReadExternal(this)) return; pd = ProgressDialog.show(this, "Reading Directory.", "Please Wait...", true, false); Log.d("New Thread","Called"); Thread thread = new Thread(this); thread.start(); } public void run() { Log.d("New Thread","Reading Files"); getFiles(); handler.sendEmptyMessage(0); } public void getFiles() { for (int i=0;i<=allFiles.length-1;i++){ //I WANT TO PASS THE FILE PATH BACK TU A HANDLER IN THE UI //SO IT CAN BE DRAWN. **passFilePathBackToBeDrawn(allFiles[i].toString());** } } }

    Read the article

  • Is this (Lock-Free) Queue Implementation Thread-Safe?

    - by Hosam Aly
    I am trying to create a lock-free queue implementation in Java, mainly for personal learning. The queue should be a general one, allowing any number of readers and/or writers concurrently. Would you please review it, and suggest any improvements/issues you find? Thank you. import java.util.concurrent.atomic.AtomicReference; public class LockFreeQueue<T> { private static class Node<E> { E value; volatile Node<E> next; Node(E value) { this.value = value; } } private AtomicReference<Node<T>> head, tail; public LockFreeQueue() { // have both head and tail point to a dummy node Node<T> dummyNode = new Node<T>(null); head = new AtomicReference<Node<T>>(dummyNode); tail = new AtomicReference<Node<T>>(dummyNode); } /** * Puts an object at the end of the queue. */ public void putObject(T value) { Node<T> newNode = new Node<T>(value); Node<T> prevTailNode = tail.getAndSet(newNode); prevTailNode.next = newNode; } /** * Gets an object from the beginning of the queue. The object is removed * from the queue. If there are no objects in the queue, returns null. */ public T getObject() { Node<T> headNode, valueNode; // move head node to the next node using atomic semantics // as long as next node is not null do { headNode = head.get(); valueNode = headNode.next; // try until the whole loop executes pseudo-atomically // (i.e. unaffected by modifications done by other threads) } while (valueNode != null && !head.compareAndSet(headNode, valueNode)); T value = (valueNode != null ? valueNode.value : null); // release the value pointed to by head, keeping the head node dummy if (valueNode != null) valueNode.value = null; return value; }

    Read the article

  • thread local stroage macosx

    - by anon
    http://developer.apple.com/mac/library/documentation/DeveloperTools/gcc-4.0.1/gcc/Thread_002dLocal.html Documents __thread yet my g++ compalins that __thread is not suppoted on my arch (Leopard on Macbookpro). Why is this? And how do I get around it?

    Read the article

  • Cache consistency & spawning a thread

    - by Dave Keck
    Background I've been reading through various books and articles to learn about processor caches, cache consistency, and memory barriers in the context of concurrent execution. So far though, I have been unable to determine whether a common coding practice of mine is safe in the strictest sense. Assumptions The following pseudo-code is executed on a two-processor machine: int sharedVar = 0; myThread() { print(sharedVar); } main() { sharedVar = 1; spawnThread(myThread); sleep(-1); } main() executes on processor 1 (P1), while myThread() executes on P2. Initially, sharedVar exists in the caches of both P1 and P2 with the initial value of 0 (due to some "warm-up code" that isn't shown above.) Question Strictly speaking – preferably without assuming any particular CPU – is myThread() guaranteed to print 1? With my newfound knowledge of processor caches, it seems entirely possible that at the time of the print() statement, P2 may not have received the invalidation request for sharedVar caused by P1's assignment in main(). Therefore, it seems possible that myThread() could print 0. References These are the related articles and books I've been reading. (It wouldn't allow me to format these as links because I'm a new user - sorry.) Shared Memory Consistency Models: A Tutorial hpl.hp.com/techreports/Compaq-DEC/WRL-95-7.pdf Memory Barriers: a Hardware View for Software Hackers rdrop.com/users/paulmck/scalability/paper/whymb.2009.04.05a.pdf Linux Kernel Memory Barriers kernel.org/doc/Documentation/memory-barriers.txt Computer Architecture: A Quantitative Approach amazon.com/Computer-Architecture-Quantitative-Approach-4th/dp/0123704901/ref=dp_ob_title_bk

    Read the article

  • java share data between thread

    - by ayush
    i have a java process that reads data from a socket server. Thus i have a BufferedReader and a PrintWriter object corresponding to that socket. Now in the same java process i have a multithreaded java server that accepts client connections. I want to achieve a functionality where all these clients that i accept can read data from the BufferedReader object that i mentioned above.(so that they can multiplex the data) How do i make these individual client threads read the data from BuffereReader single object? Sorry for the confusion.

    Read the article

  • Is this ruby code thread safe?

    - by Ben K.
    Is this code threadsafe? It seems like it should be, because @myvar will never be assigned from multiple threads (assuming block completes in < 1s). But do I need to be worried about a situation where the second block is trying to read @myvar as it's being written? require 'rubygems' require 'eventmachine' @myvar = Time.now.to_i EventMachine.run do EventMachine.add_periodic_timer(1) do EventMachine.defer do @myvar = Time.now.to_i # some calculation and reassign end end EventMachine.add_periodic_timer(0.5) do puts @myvar end end

    Read the article

  • How do I make a background thread in Java that allows the main application to exit completely? This

    - by Bob
    I have a Java application that creates a new thread to do some work. I can launch the new thread with no problems. When the "main" program terminates, I want the thread I created to keep running - which it does... But the problem is, when I run the main application from Eclipse or from Ant under Windows, control doesn't return unless the background process is killed. If I fork the main java process in ant, I want control to return to ant once the main thread is done with its work... But as it is, ant continues to wait until both the main process and the created thread are both terminated. How do I launch the thread in the background such that control will return to ant when the "main" application is finished? (By the way, when I run the same application under Linux, I am able to do this with no problems).

    Read the article

  • Java Thread - Memory consistency errors

    - by Yatendra Goel
    I was reading a Sun's tutorial on Concurrency. But I couldn't understand exactly what memory consistency errors are? I googled about that but didn't find any helpful tutorial or article about that. I know that this question is a subjective one, so you can provide me links to articles on the above topic. It would be great if you explain it with a simple example.

    Read the article

  • ID generator with local static variable - thread-safe?

    - by Poseidon
    Will the following piece of code work as expected in a multi-threaded scenario? int getUniqueID() { static int ID=0; return ++ID; } It's not necessary that the IDs to be contiguous - even if it skips a value, it's fine. Can it be said that when this function returns, the value returned will be unique across all threads?

    Read the article

  • [Toplink] How to add c3p0 or DBCP Connection pool?

    - by Jean N.T.
    Hello, Could you please explain to me how to add a standalone c3pO or DBCP connection pool to my toplink-based JPA project? I have a persistence.xml file, and everytime I want to query the database, I'm doing this: EntityManagerFactory emf = this.getEntityManagerFactory(); // Surely using persistence.xml to set up the factory EntityManager em = emf.createEntityManager(); ... Where do I build the bridge between my external connection pool manager and Toplink? Any ideas or links are welcomed. Regards, Jean

    Read the article

  • Why does not Asp.net mvc application work on Asp.Net Classic Application Pool?

    - by Amitabh
    I have an Asp.Net MVC 2 web application deployed on IIS 7.5 on .Net 4.0. When I select application pool as Asp.Net v4.0 Classic I get the following error. HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory. The same application works fine when I select application pool as Asp.Net v4.0 Integrated. Does anyone know what is the reason for this?

    Read the article

  • IIS7.5 Domain Account Application Pool Identity for SQL Server Authentication

    - by Gareth Hill
    In Windows Server 2003/IIS6 land we typically create an app pool that runs as the identity of an AD account created with minimal privileges simply for that purpose. This same domain user would also be granted access to SQL Server so that any ASP.NET application in that app pool would be able to connect to SQL Server with Integrated Security=SSPI. We are making a brave move to the world of Windows Server 2008 R2/IIS7.5 and are looking to replicate this model, but I am struggling with how to make the application pool in IIS7.5 run as the identity of an AD account? I know this sounds simple and hopefully it is, but my attempts so far have been fruitless. Should the application pool identity be a 'Custom account' for a domain account? Does the domain account need to be added to any groups?

    Read the article

  • win2008 r2 IIS7.5 - setting up a custom user for an application pool, and trust issues

    - by Ken Egozi
    Scenario: blank win2008 r2 install the goal was to have a couple of sites running with isolated pool and dedicated users A new folder for a new website - c:\web\siteA\wwwroot, with the app (asp.net) deployed there in the /bin folder created a user named "appuser" and added it to the IIS_USERS group gave the website folder read and execute permissions for IIS_USERS and the appuser created the IIS site. set the app=pool identity to the appuser now I'm getting YSOD telling me that the trust-level is too low - SecurityException: That assembly does not allow partially trusted callers Added <trust level="Full" /> on the web-config, did not help changing the app-pool user to Administrator makes the site run Setting "anonymous user identity" to either IUSR or the app pool identity makes no difference any idea? is there a "step by step" howto guide for setting up users for isolated app pools on IIS7.5?

    Read the article

  • Creating an app pool a month to limit the scope of issues

    - by user39550
    I have about 360 sites running on a single app pool. Now I know we have a coding issue with one of those sites, were we have accidentally coded a memory leak. So what happens is the site runs, the memory leak starts and soon the app pool runs out of memory. Then slowly but surely, the rest of the 360 sites start going down like a domino affect. I understand that the root of the problem is some bad coding, which we'll fix, but instead of bringing down said 360 sites, I was thinking, we could create a new app-pool monthly that every site we create would go into that months app pool. First, that limit the scope of the issues to 5 - 20 sites and second if one site started having issues we wouldn't be bringing down all 360 sites. Is there any issues to this thinking, possible ramifications? Thanks in Advance! Jeremiah

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >