Search Results

Search found 1616 results on 65 pages for 'async ctp'.

Page 8/65 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Two questions on ensuring EndInvoke() gets called on a list of IAsyncResult objects

    - by RobV
    So this question is regarding the .Net IAsyncResult design pattern and the necessity of calling EndInvoke as covered in this question Background I have some code where I'm firing off potentially many asynchronous calls to a particular function and then waiting for all these calls to finish before using EndInvoke() to get back all the results. Question 1 I don't know whether any of the calls has encountered an exception until I call EndInvoke() and in the event that an exception occurs in one of the calls the entire method should fail and the exception gets wrapped into an API specific exception and thrown upwards. So my first question is what's the best way then to ensure that the remainder of the async calls get properly terminated? Is a finally block which calls EndInvoke() on the remainder of the unterminated calls (and ignores any further exceptions) the best way to do this? Question 2 Secondly when I first fire off all my asyc calls I then call WaitHandle.WaitAll() on the array of WaitHandle instances that I've got from my IAsyncResult instances. The method which is firing all these async calls has a timeout to adhere to so I provide this to the WaitAll() method. Then I test whether all the calls have completed, if not then the timeout must have been reached so the method should also fail and throw another API specific exception. So my second question is what should I do in this case? I need to call EndInvoke() to terminate all these async calls before I throw the error but at the same time I don't want the code to get stuck since EndInvoke() is blocking. In theory at least if the WaitAll() call times out then all the async calls should themselves have timed out and thrown exceptions (thus completing the call) since they are also governed by a timeout but this timeout is potentially different from the main timeout

    Read the article

  • Windows Embedded Standard 8 : la CTP 2 disponible, 6.000 développeurs utiliseraient déjà l'OS embarqué dérivé de Windows 8

    Windows Embedded Standard 8 : la deuxième CTP disponible Plus de 6 000 développeurs utilisent déjà l'OS embarqué dérivé de Windows 8 Mise à jour du 07/06/12 Hier, au salon Computex de Taïwan, Steven Guggenheimer, vice-président du service OEM de Microsoft, est monté sur scène pour présenter les dernières technologies de Microsoft sur les « systèmes intelligents » (appareils qui embarquent un OS et qui permettent de se connecter à des terminaux spécialisés ou à des services en ligne comme des serveurs distants ou des bases de données). Il en a profité pour annoncer la disponibilité de la deuxième community technology preview (CTP) de Windows Embedded Standard 8...

    Read the article

  • Microsoft sort SQL Server 2014 CTP 2 et vante ses nouvelles capacités In-Memory permettant d'accélérer 30 fois les performances

    Microsoft sort SQL Server 2014 CTP 2 et vante ses nouvelles capacités In-Memory permettant d'accélérer 30 fois les performancesMicrosoft a profité de son salon Pass Summit 2013 dédié à SQL Server pour dévoiler la CTP 2 de sa plateforme de gestion de données moderne SQL Server 2014.SQL Server 2014 est conçu autour de trois objectifs majeurs : offrir un système de base de données « In-Memory », de nouvelles capacités Cloud pour simplifier l'adoption du Cloud Computing pour les bases de données SQL...

    Read the article

  • how i add ctp extension in netbeans.

    - by dilip
    How i add CTP Extension using following method but it is not worked can any one help me ? ** 1. Open preferences. 2. Select Miscellaneous tab. 3. Select Files sub-tab thing. 4. Click on New file extension and enter tpl. 5. Select the mime type. 6. Click ok. Done! **

    Read the article

  • VS 2008 and F# Feb CTP - Can't debug

    - by Steve
    I have downloaded the VS2008 integrated shell, and the F# Feb CTP and I have the F# environment working just fine. The problem comes when I try to debug. Nothing happens at all. The output window says ------ Build started: Project: ConsoleApplication1, Configuration: Debug Any CPU ------ ========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ========== and none of my breakpoints are hit. My "program" is as simple as can be #light open System printfn "Hello World" Console.ReadKey(true) with breakpoints on the printfn and Console lines. The things I've read seem to suggest that debugging would work with this setup, and there is a debugger folder under common7/packages with files in it. Thanks for any help. EDIT: I'm on Win7 64 bit

    Read the article

  • TCPlistener.BeginAcceptSocket - async question

    - by Mirek
    Hi, Some time ago I have payed to a programmer for doing multithread server. In the meantime I have learned C# a bit and now I think I can see the slowndown problem - I was told by that guy that nothing is processed on the main thread (Form) so it cannot be frozen..but it is. But I think that altough BeginAcceptSocket is async operation, but its callback runs on the main thread and if there is locking, thats the reason why the app freezes. Am I right? Thanks this.mTcpListener.BeginAcceptSocket(this.AcceptClient, null); protected void AcceptClient(IAsyncResult ar) { //some locking stuff }

    Read the article

  • Not getting a response when using Android Async HTTP (from loopj)

    - by conor
    I am using the Async Http library from loopj.com and also the sample code from the site. The problem is that when the request is made I don't get a response. I have even overridden the onFinish() function which isn't getting fire either. I am using the sample code from their site which is as follows: import com.loopj.android.http.AsyncHttpClient; import com.loopj.android.http.AsyncHttpResponseHandler; Log.v("bopzy_debug", "Testing HTTP Connectivity"); System.out.println("123"); AsyncHttpClient client = new AsyncHttpClient(); client.get("http://www.google.com", new AsyncHttpResponseHandler() { @Override public void onSuccess(String response) { Log.v("bopzy_debug", response); } @Override public void onFinish() { Log.v("bopzy_debug", "Finished.."); } }); Any ideas on how to solve would be greatly appreciated, not really sure what is going on here.

    Read the article

  • async handler deleted by the wrong thread in django

    - by user3480706
    I'm run this algorithm in my django application.when i run several time from my GUI django local server will stopped and i got this error Exception RuntimeError: RuntimeError('main thread is not in main loop',) in ignored Tcl_AsyncDelete: async handler deleted by the wrong thread Aborted (core dumped) code print "Learning the sin function" network =MLP.MLP(2,10,1) samples = np.zeros(2000, dtype=[('x', float, 1), ('y', float, 1)]) samples['x'] = np.linspace(-5,5,2000) samples['y'] = np.sin(samples['x']) #samples['y'] = np.linspace(-4,4,2500) for i in range(100000): n = np.random.randint(samples.size) network.propagate_forward(samples['x'][n]) network.propagate_backward(samples['y'][n]) plt.figure(figsize=(10,5)) # Draw real function x = samples['x'] y = samples['y'] #x=np.linspace(-6.0,7.0,50) plt.plot(x,y,color='b',lw=1) samples1 = np.zeros(2000, dtype=[('x1', float, 1), ('y1', float, 1)]) samples1['x1'] = np.linspace(-4,4,2000) samples1['y1'] = np.sin(samples1['x1']) # Draw network approximated function for i in range(samples1.size): samples1['y1'][i] = network.propagate_forward(samples1['x1'][i]) plt.plot(samples1['x1'],samples1['y1'],color='r',lw=3) plt.axis([-2,2,-2,2]) plt.show() plt.close() return HttpResponseRedirect('/charts/charts') how can i fix this error ?need a quick help

    Read the article

  • Problem with StandardOutput stream in async mode.

    - by JF
    Hi everyone. I have a program that launches command line processes in async mode, using BeginOutputReadLine. My problem is that the .Exited event is triggered when there is still some .OutputDataReceived events being triggered. What I do in my .Exited event must happen only once all my .OutputDataReceived events are done, or I'll be missing some output. I looked in the Process class to see if anything could be useful to me, as to wait for the stream to be empty, but all I find is for sync mode only. Can any of you help? Thanx.

    Read the article

  • Async Socket Listener on separate thread - VB.net

    - by TheHockeyGeek
    I am trying to use the code from Microsoft for an Async Socket connection. It appears the listener runs in the main thread locking the GUI. I am new at both socket connections and multi-threading all at the same time. Having a hard time getting my mind wrapped around this all at once. The code used is at http://msdn.microsoft.com/en-us/library/fx6588te.aspx Using this example, how can I move the listener to its own thread? Public Shared Sub Main() ' Data buffer for incoming data. Dim bytes() As Byte = New [Byte](1023) {} ' Establish the local endpoint for the socket. Dim ipHostInfo As IPHostEntry = Dns.GetHostEntry(Dns.GetHostName()) Dim ipAddress As IPAddress = ipHostInfo.AddressList(1) Dim localEndPoint As New IPEndPoint(ipAddress, 11000) ' Create a TCP/IP socket. Dim listener As New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp) ' Bind the socket to the local endpoint and listen for incoming connections. listener.Bind(localEndPoint) listener.Listen(100)

    Read the article

  • [C#] Async threaded tcp server

    - by mark_dj
    I want to create a high performance server in C# which could take about ~10k clients. Now i started writing a TcpServer with C# and for each client-connection i open a new thread. I also use one thread to accept the connections. So far so good, works fine. The server has to deserialize AMF incoming objects do some logic ( like saving the position of a player ) and send some object back ( serializing objects ). I am not worried about the serializing/deserializing part atm. My main concern is that I will have a lot of threads with 10k clients and i've read somewhere that an OS can only hold like a few hunderd threads. Are there any sources/articles available on writing a decent async threaded server ? Are there other possibilties or will 10k threads work fine ? I've looked on google, but i couldn't find much info about design patterns or ways which explain it clearly

    Read the article

  • Google Analytics - async tracking with two accounts

    - by MatW
    I'm currently testing GAs new async code snippet using two different tracking codes on the same page; _gaq.push( ['_setAccount', 'UA-XXXXXXXX-1'], ['_trackPageview'], ['b._setAccount', 'UA-XXXXXXXX-2'], ['b._trackPageview'] ); Although both codes work, I've noticed that they present inconsistent results. Now, we aren't talking huge differences here, only 1 or 2 visits / day every now and then. However, this site is tiny and 1 or 2 visits equates to a 15% difference in figures. Now, the final site has much more traffic, but my concerns are; will this inconsistancy scale with traffic? assuming not, is a slight variation in recorded stats an accepted norm?

    Read the article

  • Log RuntimeException thrown from thread created by Spring via the @Async annotation

    - by Eugen
    I'm having some difficulty logging RuntimeException from a thread. My system is: Java 7 (b118), Spring 3.0.5. The threads are not created by hand, but via Spring's @Async annotation, which creates it's own executor behind the scenes, so I don't really have the option of overriding any methods of the thread, FutureTask or anything low level. So my question is if Spring has any support or if there are any best practices for handling (logging) these type of exceptions? Any suggestions are appreciated. Thanks.

    Read the article

  • Loopj Android Async Http - onFailure not fired

    - by Ashley Staggs
    I am using the great async http library from loopj, but I have run into a small snag. If the user has no internet connection or loses their connection, the app just won't return anything. This part is expected, but it also doesn't fire the onFailure method. Also, the code I have used when there is an internet connection does work so there is no problem on the server end. Here is some code that is stripped down to the minimum. It also doesn't work (I have tested this too) String url = getString(R.string.baseurl) + "/appconnect.php"; client.getHttpClient().getParams().setParameter(ClientPNames.ALLOW_CIRCULAR_REDIRECTS, true); client.get(url, null, new JsonHttpResponseHandler() { @Override public void onSuccess(JSONArray response) { Toast.makeText(getApplicationContext(), "Success", Toast.LENGTH_SHORT).show(); } @Override public void onFailure(Throwable e, JSONArray errorResponse) { Toast.makeText(getApplicationContext(), "Failure", Toast.LENGTH_SHORT).show(); } }); Thanks, Ashley

    Read the article

  • C# Async call garbage collection

    - by Troy
    Hello. I am working on a Silverlight/WCF application and of course have numerous async calls throughout the Silverlight program. I was wondering on how is the best way to handle the creation of the client classes and subscribing. Specifically, if I subscribe to an event in a method, after it returns does it fall out of scope? internal MyClass { public void OnMyButtonClicked() { var wcfClient = new WcfClient(); wcfClient.SomeMethodFinished += OnMethodCompleted; wcfClient.SomeMethodAsync(); } private void OnMethodCompleted(object sender, EventArgs args) { //Do something with the result //After this method does the subscription to the event //fall out of scope for garbage collection? } } Will I run into problems if I call the function again and create another subscription? Thanks in advance to anyone who responds.

    Read the article

  • Which async call use for DB connection and still responsive GUI?--

    - by Jade
    Hi, My application connects to MSSQL but sometimes it takes a while and the GUI is getting frozen. I would like to do the connection on the other thread, I guess BeginInvoke would be the best way (I know about background worker but I would like to learn this). I have studied MSDN page but I did not understand what is the best way to use? They also say that you can use only callback when the thread that called the async.method does not need to know the results...I dont understand it as I believe I can set some variable in the other thread to "pass" the result well. I would just need the GUI to be not frozen while the connection is being established. Thank you for your advice.

    Read the article

  • Handling multiple async HTTP requests in Silverlight serially

    - by Jeb
    Due to the async nature of http access via WebClient or HttpWebRequest in Silverlight 4, when I want to do multiple http get/posts serially, I find myself writing code that looks like this: doFirstGet(someParams, () => { doSecondGet(someParams, () => { doThirdGet(... } }); Or something similar. I'll end up nesting subsequent calls within callbacks usually implemented using lambdas of some sort. Even if I break things out into Actions or separate methods, it still ends up being hard to read. Does anyone have a clean solution to executing multiple http requests in SL 4 serially? I don't need things to be synchronous, I just want serial execution.

    Read the article

  • C# TCP Async EndReceive() throws InvalidOperationException ONLY on Windows XP 32-bit

    - by James Farmer
    I have a simple C# Async Client using a .NET socket that waits for timed messages from a local Java server used for automating commands. The messages come in asynchronously and is written to a ring buffer. This implementation seems to work fine on Windows Vista/7/8 and OSX, but will randomly throw this exception while it's receiving a message from the local Java server: Unhandled Exception: System.InvalidOperationException: EndReceive can only be called once for each asynchronous operation.     at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult, SocketError& errorCode)     at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)     at SocketTest.Controller.RecvAsyncCallback(IAsyncResult ar)     at System.Net.LazyAsyncResult.Complete(IntPtr userToken)     ... I've looked online for this error, but have found nothing really helpful. This is the code where it seems to break: /// <summary> /// Callback to receive socket data /// </summary> /// <param name="ar">AsyncResult to pass to End</param> private void RecvAsyncCallback(IAsyncResult ar) { // The exception will randomly happen on this call int bytes = _socket.EndReceive(_recvAsyncResult); // check for connection closed if (bytes == 0) { return; } _ringBuffer.Write(_buffer, 0, bytes); // Checks buffer CheckBuffer(); _recvAsyncResult = _sock.BeginReceive(_buffer, 0, _buffer.Length, SocketFlags.None, RecvAsyncCallback, null); } The error doesn't happen on any particular moment except in the middle of receiving a message. The message itself can be any length for this to happen, and the exception can happen right away, or sometimes even up to a minute of perfect communication. I'm pretty new with sockets and network communication, and I feel I might be missing something here. I've tested on at least 8 different computers, and the only similarity with the computers that throw this exception is that their OS is Windows XP 32-bit.

    Read the article

  • Using SoapExtensionAttributes on client side with async web methods

    - by Maxim Polishchuk
    Hey, I have a simple question. I implemented custom soap extension and registered it into client application configuration file. It works fine. (I would like to implement progress bar functionality like http://msdn.microsoft.com/en-us/library/aa480520.aspx) But I don't like some thing - custom soap extension is invoked by every call of my web service. In order to fix this situation (call WS just by required methods) I implemented custom SoapExtensionAttribute like below: [AttributeUsage(AttributeTargets.Method)] public class CustomSoapExtensionAttribute : SoapExtensionAttribute { public override int Priority { get; set; } public CustomSoapExtensionAttribute() : this (1) { } public CustomSoapExtensionAttribute(int priority) { Priority = priority; } public override Type ExtensionType { get { return typeof(CustomSoapExtension); } } } I added this attribute to required methods of web service proxy classes (and removed registration into client configuration file). My soap extension doesn't invoke when required web methods are calling. Can someone help me to solve this problem or select any other solution? Anotherone, I don't know it is important or not - my required methods are async web methods. Best regards, Maxim

    Read the article

  • problem in silverlight 4 async how to wait till result come

    - by AQEEL
    Here is what i have problem i have following code : //Get All master record entryE_QuestMaster = new ObservableCollection<E_QuestMaster>(); QuestVM.getExamsMasterbyExamID(eUtility.ConvertInt32(this.txtID.Text), ref entryE_QuestMaster); // //Loop to show questions int iNumber=1; foreach (var oIn in entryE_QuestMaster) { Node subNode = new Node(); subNode.Content = oIn.e_Question; subNode.Name = "Quest_" + iNumber.ToString().Trim(); subNode.Tag = oIn.e_QID.ToString(); subNode.Icon = "/Images/Number/" + iNumber.ToString().Trim() + ".gif"; iNumber++; this.tvMainNode.Nodes.Add(subNode); } here is async method calling wcf service /// <summary> /// /// </summary> /// <param name="ID"></param> public void getExamsMasterbyExamID(int ID, ref ObservableCollection<E_QuestMaster> iCollectionData) { ObservableCollection<E_QuestMaster> iCollectionDataResult = iCollectionData; eLearningDataServiceClient client = new eLearningDataServiceClient(); client.getExamsMasterCompleted+=(s,e)=> { iCollectionDataResult = e.Result; }; client.getExamsMasterAsync(ID); } problem : when ever system run -- QuestVM.getExamsMasterbyExamID(eUtility.ConvertInt32(this.txtID.Text), ref entryE_QuestMaster); its does not wait till i get e.result its just move to next line of code which is foreach loop. plssss help any one or give idea with sample code what should i do to wait till e.result i wanted to some how wait till i get e.result any idea ?

    Read the article

  • ScrollView content async downloading problem

    - by Newbee
    Hi! I have UIScrollView with lots of UIImageView inside. In the loadView method I assign some temporary image for each of subview UIImageView images and starts several threads to async download images from internet. Each thread downloads and assign images as follows: NSData *data = [NSData dataWithContentsOfURL:URL]; UIImage *img = [UIImage imageWithData:data]; img_view.image = img; Here is the problem - I expects picture will changed after each image downloaded by I can see only temporary images until all images will downloads. UIScrollView still interact while images downloads - I can scroll temporary images inside it and see scrollers and nothing blocks run loop, but downloaded images doesn't updates.. What I tried to do: Call sleep() in the download thread -- not helps. Call setNeedsDisplay for each ImageView inside ScrollView and for ScrollView -- not helps. What's wrong ? Thanks. Update. I tried some experiments with number of threads and number of images to download. Now I'm sure -- images redraws only when thread finished. For example - if I load 100 images with one thread -- picture updates one time after all images downloads. If I increase number of threads to 10 -- picture updates 10 times -- 10 images appears per update. One more update. I fixed problem by staring new thread from the downloading threads each time one image downloaded and exit current thread (instead of download several images in one thread in the cycle and exit thread only when all downloaded). Obviously it's not a good solution and there must be right approach.

    Read the article

  • Adding a ServiceReference programmatically during async postback

    - by Oliver
    Is it possible to add a new ServiceReference instance to the ScriptManager on the Page during an asynchronous postback so that subsequently I can use the referenced web service through client side script? I'm trying to do this inside a UserControl that sits inside a Repeater, that's why adding the ScriptReference programmatically during Page_Load does not work here. EDIT 2: This is the code I call from my UserControl which does not do what I expect (adding the ServiceReference to the ScriptManager during the async postback): private void RegisterWebservice(Type webserviceType) { var scm = ScriptManager.GetCurrent(Page); if (scm == null) throw new InvalidOperationException("ScriptManager needed on the Page!"); scm.Services.Add(new ServiceReference("~/" + webserviceType.Name + ".asmx")); } My goal is for my my UserControl to be as unobtrusive to the surrounding application as possible; otherwise I would have to statically define the ServiceReference in a ScriptManagerProxy on the containing Page, which is not what I want. EDIT: I must have been tired when I wrote this post... because I meant to write ServiceReference not ScriptReference. Updated the text above accordingly. Now I have: <asp:ScriptManagerProxy runat="server" ID="scmProxy"> <Services> <asp:ServiceReference Path="~/UsefulnessWebService.asmx" /> </Services> </asp:ScriptManagerProxy> but I want to register the webservice in the CodeBehind.

    Read the article

  • C# async callback on disposed form

    - by Rodney Burton
    Quick question: One of my forms in my winform app (c#) makes an async call to a WCF service to get some data. If the form happens to close before the callback happens, it crashes with an error about accessing a disposed object. What's the correct way to check/handle this situation? The error happens on the Invoke call to the method to update my form, but I can't drill down to the inner exception because it says the code has been optimized. The Code: public void RequestUserPhoto(int userID) { WCF.Service.BeginGetUserPhoto(userID, new AsyncCallback(GetUserPhotoCB), userID); } public void GetUserPhotoCB(IAsyncResult result) { var photo = WCF.Service.EndGetUserPhoto(result); int userID = (int)result.AsyncState; UpdateUserPhoto(userID, photo); } public delegate void UpdateUserPhotoDelegate(int userID, Binary photo); public void UpdateUserPhoto(int userID, Binary photo) { if (InvokeRequired) { var d = new UpdateUserPhotoDelegate(UpdateUserPhoto); Invoke(d, new object[] { userID, photo }); } else { if (photo != null) { var ms = new MemoryStream(photo.ToArray()); var bmp = new System.Drawing.Bitmap(ms); if (userID == theForm.AuthUserID) { pbMyPhoto.BackgroundImage = bmp; } else { pbPhoto.BackgroundImage = bmp; } } } }

    Read the article

  • problems with async jquery and loops

    - by Seth Vargo
    I am so confused. I am trying to append portals to a page by looping through an array and calling a method I wrote called addModule(). The method gets called the right number of times (checked via an alert statement), in the correct order, but only one or two of the portals actually populate. I have a feeling its something with the loop and async, but it's easier explained with the code: moduleList = [['weather','test'],['test']]; for(i in moduleList) { $('#content').append(''); for(j in moduleList[i]) { addModule(i,moduleList[i][j]); //column,name } } function addModule(column,name) { alert('adding module ' + name); $.get('/modules/' + name.replace(' ','-') + '.php',function(data){ $('#'+column).append(data); }); } for each array in the main array, I append a new column, since that's what each sub-array is - a column of portals. Then I loop through that sub array and call addModule on that column and the name of that module (which works correctly). Something buggy happens in my addModule method that it only adds the first and last modules, or sometimes a middle one, or sometimes none at all... im so confused!

    Read the article

  • Chrome extension sendRequest from async callback not working?

    - by Eugene
    Can't figure out what's wrong. onRequest not triggered on call from async callback method, the same request from content script works. The sample code below. background.js ============= ... makeAsyncRequest(); ... chrome.extension.onRequest.addListener(function(request, sender, sendResponse) { switch (request.id) { case "from_content_script": // This works console.log("from_content_script"); sendResponse({}); // clean up break; case "from_async": // Not working! console.log("from_async"); sendResponse({}); // clean up break; } }); methods.js ========== makeAsyncRequest = function() { ... var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function() { if (xhr.readyState == 4) { ... // It works console.log("makeAsyncRequest callback"); chrome.extension.sendRequest({id: "from_async"}, function(response) { }); } } ... }; UPDATE: manifest configuration file. Don't no what's wrong here. { "name": "TestExt", "version": "0.0.1", "icons": { "48": "img/icon-48-green.gif" }, "description": "write it later", "background_page": "background.html", "options_page": "options.html", "browser_action": { "default_title": "TestExt", "default_icon": "img/icon-48-green.gif" }, "permissions": [ "tabs", "http://*/*", "https://*/*", "file://*/*", "webNavigation" ] }

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >