Search Results

Search found 10883 results on 436 pages for 'thread timeout'.

Page 58/436 | < Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >

  • Counting context switches per thread

    - by Sarmun
    Is there a way to see how many context switches each thread generates? (both in and out if possible) Either in X/s, or to let it run and give aggregated data after some time. (either on linux or on windows) I have found only tools that give aggregated context-switching number for whole os or per process. My program makes many context switches (50k/s), probably a lot not necessary, but I am not sure where to start optimizing, where do most of those happen.

    Read the article

  • Python: Control timeout length

    - by skylarking
    I have code similar to the following running in a script: try: s = ftplib.FTP('xxx.xxx.xxx.xxx','username','password') except: print ('Could not contact FTP serer') sys.exit() IF the FTP site is inaccessible, the script almost seems to 'hang' ... It is taking about 75 seconds on average before sys.exit() appears to be called... I know the 75 seconds is probably very subjective, and dependent on the system this runs on...but is there a way to have python just try this once, and if unsucessful, to exit immediately? The platform I am using for this is Mac OS X 10.5/python 2.5.1.

    Read the article

  • Trying to link my project with Boost.Thread using CMake

    - by wowus
    When I link Boost.Thread to my boost_test executable, it gives me make[2]: *** No rule to make target `/usr/lib64/libboost_thread-mt.so', needed by `gogo/test/test_boost'. Stop. when I make it. Here's the offending CMake code, what am I doing wrong? add_executable(boost_test boost_test.cpp) add_test(boost_test boost_test) # Boost auto-links for MSVC, so we exclude it. if(CMAKE_COMPILER_IS_GNUCXX) target_link_libraries(test_boost #LINK_INTERFACE_LIBRARIES ${Boost_THREAD_LIBRARY} ) endif()

    Read the article

  • C++ thread to seperate process

    - by silverbandit91
    Is there any way i can have a thread branch off into it's own independent process? I know there's the CreateProcess function but as far as I can tell, you can only run external applications with it. Is what I'm asking for at all possible?

    Read the article

  • Static method,new thread performance question

    - by ylazez
    Hey guys i just have two questions about two methods used in many controllers/servlets in my app: 1-what is the difference between calling a static method in a util class or a non static method (like methods dealing with dates i.e getting current time,converting between timezones), which is better ? 2-what is the difference between calling a method(contain too many logic like sending emails) in the controller directly or running this method in a different thread ?

    Read the article

  • static thread function access non-static class member in C++

    - by user397390
    Class Test{ int value; static void* thread_func(void* args){ value++; } void newthread(){ pthread_create(&thread_func,...); } } I'm trying to create a thread in Class Test. Therefore compiler forces me to make thread_func static. However I cannot access the non-static member "value" anymore. It says: invalid use of member 'Class::value' in static member function Is there a way around it?

    Read the article

  • MySQL connection timeout

    - by NikolayGS
    I'm running program at apache tomcat server, that should be on permanently, but every morning(the client part isn't accessible at night) i receive error message (in apache tomcat console) that MySQL server is off. So is there any way to prevent this? Thanks in advance!

    Read the article

  • How to trigger an event in input text after I stop typing/writting?

    - by user1386320
    I want to trigger event just right after I stop typing (not while typing) characters in my input textbox. I've tried with: $('input#username').keypress(function() { var _this = $(this); // copy of this object for further usage setTimeout(function() { $.post('/ajax/fetch', { type: 'username', value: _this.val() }, function(data) { if(!data.success) { // continue working } else { // throw an error } }, 'json'); }, 3000); }); But this example produces a timeout for every typed character and I get about 20 AJAX requests if I type-in 20 characters. On this fiddle I demonstrate the same problem with a simple alert instead of an AJAX. Is there a solution for this or I'm just using a bad approach for this?

    Read the article

  • How to limit a request execution time of WCF service?

    - by Kamarey
    Is there something in WCF configuration that defines a timeout for executing a request at service side? E.g. WCF service will stop executing request after some time period. I have a service which make some work depending on client input. In some cases a such call may take too much time. I want to limit the execution time of such requests on service side, not client one using SendTimeout. I know about OperationTimeout property, but it doesn't abort the service request, it just tells a client that the request is timed out.

    Read the article

  • Facebook call back function with timeout

    - by Dirty Bird Design
    So I've been getting my ass kicked pretty good with Facebook's moving target of an API. I need to display some hidden content after a person clicks 'like' on a landing page. I can somewhat get this to work, when the user clicks 'like' the normal fb dialogue appears and then goes away immediately and content is displayed. I have 'achieved' this with the following js. <script> FB.Event.subscribe('edge.create', function(href, widget) { document.getElementById('goodies').style.display = "block"; document.getElementById('fb-content').style.display= "block"; document.getElementById('copy').style.display = "none"; }); </script> I cannot find any documentation about a callback event after someone hits "post to facebook" or after the dialogue closes, only afte they hit like. How would I incorporate a setTimeout function into this to give people some time to fill out the fb dialogue? thanks. If anyone has a better way to do this I'm all ears. This is for a business page and I cannot seem to add an app to get an app ID anymore so the API is pretty useless to me at this point. Also, if the url to be liked is a fb page, the callbacks don't seem to fire. Other code used: <html xmlns:fb="http://ogp.me/ns/fb#"> <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script> <fb:like href="onlynonfburl.com" send="false" layout="button_count" width="450" show_faces="false" font="arial"></fb:like>

    Read the article

  • ASP.NET javascript close page after timeout?

    - by AliRiza Adiyahsi
    I want show an information page after success db opartions. And after the info I want to close each pages (information page and main page) I wrote this in button oncommand event: //but this code does not work Response.Write("<script language='javascript'>setTimeout('self.close();',3000);</script>"); at the same time, I want to show an information message. And then I want to close all, after three seconds.I hope I could explain :) Thanks.

    Read the article

  • Connection Timeout Linked Server

    - by Wade73
    I have created a linked server from one SQL Server 2005 to Another 2005. When I run an update query through the SQL Server Management Studio (SSMS), it runs in under a second. If I run the query through a asp webpage it times out. I ran SQL Profiler to see if I noticed anything as well as the Activity Monitor in SSMS and all I found was that a lock was being created (Wait type LOCK_M_U), but I can't find what is locking it. Any help would be appreciated. Wade

    Read the article

  • Reuse Hibernate session in thread

    - by Marco
    Hello, I've read somewhere that when a session is flushed or a transaction is committed, the session itself is closed by Hibernate. So, how can i reuse an Hibernate Session, in the same thread, that has been previously closed? Thanks

    Read the article

  • Python script web service timeout

    - by Robert
    We have had a Python script running for many months now that simply scans through a directory of files, and posts each file to our web site via a web service call. The web site is also written in Python. For no apparent reason, this morning this script started throwing the following error: urllib2.URLError: <urlopen error (10060, 'Operation timed out')> The site itself is up and running just fine. There are no indications of any errors. The developer that was working on this site is no longer with us, and we do not have a strong Python developer on staff as we are moving away from that. Before I do an all nighter and rewrite this thing in C#, I wanted to see if anyone had any experience dealing with this issue. I do know that the script is connecting to a secure site (HTTPS), so I am not sure if something has come up with that, and I honestly dont know where to look to determine that. As I said before, the site itself isn't showing any signs of error, including SSL. Any thoughts?

    Read the article

  • is this class thread safe?

    - by flash
    consider this class,with no instance variables and only methods which are non-synchronous can we infer from this info that this class in Thread-safe? public class test{ public void test1{ // do something } public void test2{ // do something } public void test3{ // do something } }

    Read the article

  • IS ResultSet thread safe

    - by javatraniee
    Is ResultSet Thread safe? My question arises because in this i have used a different statement for each query i have delsared a ResultSet as an local variable but it gives me a error of Operation not allowed after ResultSet is closed. But my statements are working as i'm using the statements in insert and delete query.I have commented the ResultSet part and have not got the error !! The source code of my program can be referd to , in my earlier Question .

    Read the article

  • Set timeout on third-party file request with jQuery

    - by markedup
    I'm trying to integrate a script file hosted by a third party into a new web site. Currently, I'm adding a SCRIPT tag to the DOM for that third-party script file on document ready: $(document).ready( function() { var extScript = document.createElement('script'); extScript.type = 'text/javascript'; extScript.src = 'http://third-party.com/scriptfile.js'; $('head').append(extScript); }); function extScriptCallback() { $('#extWidgetContainer').show(); } But sometimes that third-party script file request times out or takes a long time to respond. So, for the sake of best practice, I want to provide alternative content if the external script takes longer than e.g. 10 seconds to load. How do I achieve this? I've looked at JavaScript's native setTimeout(), as well as jQuery's delay() function, but I'm not sure which I should use--or how. Grateful for any suggestions.

    Read the article

  • Timeout loading application on GAE using web2py

    - by Charles P.
    I am uploading an app to GAE. Through some experimentation I've found that if I don't include wsgihandler.py, the app loads very slowly. It feels like it's looking for this file and them timing out. Besides the slow loading, everything works perfectly without wsgihandler.py, so I want to know if there is a simple way to remove the references to the file. I tried poking around the files, but it doesn't look like there are direct references. Also, I asked before what I need at a minimum to get an application to work, and I found that I need: web2py/app.yaml web2py/gaehandler.py web2py/VERSION web2py/gluon/* (and subfolders, this is web2py) web2py/applications/theoneappyouwanttodeploy/* (and subfolders)

    Read the article

  • Best Java thread-safe locking mechanism for collections?

    - by Simon
    What would be the least-slow thread-safe mechanism for controlling multiple accesses to a collection in Java? I am adding objects to the top of a collection and i am very unsure what would be the best performing collection. Would it be a vector or a queue? I originally thought an ArrayList would be fast but i ran some experiments and it was very slow. EDIT: In my insertion testing a Vector delared using volatile seems to be the fastest?

    Read the article

  • Thread-safe get (accessor method)

    - by sonofdelphi
    I'm currently using the following code for thread-safe access of a variable. int gnVariable; void getVariableValue(int *pnValue) { acquireLock(); //Acquires the protection mechanism *pnValue = gnVariable; releaseLock(); //Releasing the protection mechanism } I would like to change my API signature to a more user-friendly int getVariableValue(void); How should I rewrite the function - such that the users of the API don't have to bother about the locking/unlocking details?

    Read the article

  • Embedding script with timeout in case server goes down

    - by vsync
    I need a way to make sure my script won't block the viewed page, if the server serving the script is down (port 80 is blocked for some reason). Currently when I test it and take down the server (Apache), or close the firewall, I see in the browser that it is trying to load the resource (script in that case), without success for long seconds, until it aborts. Is there a nice way to get past this issue?

    Read the article

  • java Thread class run() method

    - by JavaUser
    Hi, Thread class has run method to implement the business logic that could be executed in parallel.But I want implement different business logics in a single run method and to run simultaneously.How to get this feature. thanks

    Read the article

< Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >