Create A Multithreaded Application?

Aug 20, 2009

I am using Visual Basic 2008 Express Edition and I want to create a multithreaded application.

View 13 Replies


ADVERTISEMENT

Chat Application NOT MultiThreaded

Mar 16, 2012

I don't want it to be MultiThreaded. i read some tutorials and have a good idea. but unfortuantely all the tutorials on the web write code without explaining. so is anyone here has a good knowledge with Chat application ? I know it's about sockets and stuff but i just need an explaination with code ;)

View 5 Replies

Make An Application Multithreaded?

Oct 14, 2010

After trying to make an application multithreaded, almost towards the end of the processing of 10,000 records, I get a webexception - operation timeout.Now it seems to process around 8000 records just fine, for each record it is also doing some business logic and with it, performing a call to a webservice.

without threading, its fine - no problems. with threading, we hit the issue.so there are 10,000 records to go through. this is of course slow when done in sync mode (Single threading) but much faster when placing items in the threadpool and waiting until completion.

im not sure exactly why the problem happens. how should I debug this when multithreading? its just odd that for around 3/4 of records, the calls are doing very well, then on the last bit to go, it bombs out.

again - no issues when single threading.update: seems to be after around 1000 records that have been processed that it seems to happen.the application calls out to an internal webservice which then does the direct callout to the "outside world" webservice. The internal webservice does some caching but shouldnt have any effect really.

The outside service it is calling is httpBinding. ReceiveTimeout is set to 00:10:00 (10 minutes) and bypassProxyOnLocal="false"im still not quite understanding why it would timeout after 1000 records because it seems to process the others just fine and does come back (or so it seems) when its making a call to the service

View 2 Replies

Managing Exception In Multithreaded Application?

Mar 20, 2009

I started throwing exceptions on a multithreaded application, and got a mess.There is a good tutorial on managing exceptions in multithreaded applications?

View 4 Replies

Multithreaded Application And Crystal Reports

Nov 16, 2009

I have developed a multithread Windows Application that requires to print various Docss/rpt's off. The problem is I get a "Load Report Failed" error message when creating a new instance of my embedded crystal report.

View 3 Replies

VS 2010 - Showing Forms On Multithreaded Application

Apr 17, 2011

I've finally gotten multi-threading working on my application, but now I'm having trouble showing forms when I need to. I currently have three threads in my program: one for updating a textbox, one for transferring files, and one for displaying forms. Here's a snippet of code from my program:

[code]...

I'm getting the error: Control 'frmXCopy' accessed from a thread other than the thread it was created on. I know what this means, but I can't find a way to make the ShowForm Sub run off of the main application thread.

View 9 Replies

C# - Multithreaded Drawing In .NET?

Jul 24, 2010

(Edit: to clarify, my main goal is concurrency, but not necessarily for multi-core machines)

I'm fairly new to all concepts on concurrency, but I figured out I needed to have parallel drawing routines, for a number of reasons:

I wanted to draw different portions of a graphic separatedly (background refreshed less often than foreground, kept on a buffer). I wanted control about priority (More priority to UI responsiveness than drawing a complex graph). I wanted to have per-frame drawing calculations multithreaded. I wanted to offer cancelling for complex on-buffer drawing routines.

However, being such a beginner, my code soon looked like a mess and refactoring or bug-fixing became so awkward that I decided I need to play more with it before doing anything serious.

So, I'd like to know how to make clean, easy to mantain .NET multithreaded code that makes sense when I look at it after waking up the next day. The bigest issue I had was structuring the application so all parts talk to each other in a smart (as opposed to awkward and hacky) way.

I have a preference for sources that I can digest in my free time (e.g., not a 500+ pages treatise on concurrency) and for C#/VB.NET, up to the latest version (since I see there have been advances). Basically I want something straight to the point so I can get started by playing with the concepts on my toy projects.

View 2 Replies

Can A Shared Method Be Multithreaded

Feb 28, 2012

As the question states, can a shared method of an object be multithreaded? I don't quite having threading down in my skillset, otherwise I would test myself. On the other hand, I am involved in designing class that could be part of a multithreaded application in VB.Net.

View 3 Replies

Debugging The Multithreaded Programs?

Oct 29, 2008

I have a background thread that waits for data to come in. When data arrives, it fires off a call to the GUI thread.All works just peachy, except if there's ever a run-time exception in the GUI thread. If that happens, the debugger always halts at the point in the worker thread that called the GUI thread. It never shows the proper line that the error occured on.How do I get the debugger to stop at the error in the GUI thread?

Here's the pertinent code from the worker thread:

Code:
Public NotInheritable Class UIThreadMarshal
Private Shared _MainForm As Form = Nothing
Public Shared WriteOnly Property MainForm() As Form

[code]....

View 4 Replies

Build A Multithreaded App - Catch The Returning Value?

Dec 26, 2010

I'm trying to build a multithreaded app but I couldnt find anything on google on how to catch the value that the lambda function returns.

ThreadPool.QueueUserWorkItem(New WaitCallback(Function() As Integer
Value += 1
Return Value
End Function))

View 9 Replies

.net - Isolating Read And Write In Multithreaded

Mar 8, 2010

In a multithreaded application. I have a bunch of function that loop through a collection to read the information. I also have a bunch of function that modifies that same collection.

I'm looking for a way to isolate all the read and the write together. I don't want a write to be done while a read is in progress. I was thinking of using SyncLock on the collection object but this will block multiple read trying to work in parallel.

View 1 Replies

Send Message To All Multithreaded Clients?

Aug 2, 2010

Given the code, ss there a way to propagate messages send from any of the multithreaded chat client to all the other chat client:

First the main will call startClient:
Public Sub startClient(ByVal inClientSocket As TcpClient, _
ByVal clineNo As String)

[code]......

View 1 Replies

Sql - Stored Procedure For Multithreaded App - Timeout Expired

Jul 5, 2011

I have an application using taskfactory that creates multiple tasks which insert records into the same table in a database. I have jobs that cleanup the table when it gets too large and have the execution time-out set to 0 in options in sql server management studio. I keep getting the following error on the tasks when trying to do an insert using a stored procedure and set an exception handling process to sleep and try again. This does not help as it seems it timeouts on almost every attempt.Not sure how to handle this and ensure the table handles all these inserts. Tried including connect timeout = 600 in one of the processes connectionstring but this did not help.Also set sqlquerytimeout value in registry to 90 but still not helping.

ERROR: timeout expired the timeout period elapsed prior to completion of the operation or the server is not responding...

could not see the details of the error since visual studio 2010 debug options had to be set that way, but I will set a responsestream and capture but I rebooted sql server and somehow everything is fine now...not sure why.

Errors have reoccurred.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception,
Boolean breakConnection)

[code]....

View 1 Replies

VB 2005 - Sync Lock In Multithreaded Programs

May 16, 2010

I have been reading through lots of sample code and explainations regaurding the uses of Sync lock in multithreaded programs but still am a little fuzzy on this.

Am I correct in assuming that if I have two or more threads running the same procedure which has a sync lock on a shared resource that the first thread to call the lock will complete its update of the resource and any of the other threads to try and lock this object would just wait in line until it is released by the first object?

I am also a bit fuzzy on what is actually locked by the sync lock.

Lets say I have code that uses sync lock and the object specified is the current thread. Does that also lock the shared resources that are referenced within the sync lock block or would I need to use another method to do this?

What if my shared resourses were all in another class and I issue a sync lock on that class before I try to modify the resources would that be the proper way to go about it?

And last but not least is there any need to use sync lock when the shared resource is in effect read only [meaning the program will read the value but will not change it during runtime]

View 8 Replies

WinForms - Writing To File In MultiThreaded App Fails

Jul 11, 2011

I have a multi threaded app that writes log to file. occasionally, saving fails using this code:
Friend Sub SaveToText(ByVal FileName As String, ByVal Text As String)
'// create a writer and open the file
Dim objLock As New Object
SyncLock objLock
Dim tw As TextWriter = Nothing
[Code] .....

The error message I get:
The process cannot access the file 'error.log' because it is being used by another process.

View 1 Replies

CORRECTLY Implement A Multithreaded Progressbar During A LINQ Query?

Oct 31, 2011

I have a linq query which loads approx. 1000 lines into a variable, during that process I want to display a progressbar, not necessarily stating the percentage, can be marquee style, doesnt matter.

This progressbar is on a modal form to precent the user from interacting with the app for the time the query's running.

[Code]...

View 3 Replies

Implement Multithreaded Crawler - Add A Unique Url To Each Thread To Go Process

Feb 1, 2010

I would like to implement a mulithtreaded crawler using the single thread crawler code I have now. Basically I read the urls from a text file, take each one and crawl and parse it. I know how thread basics of creating a thread and assigning a process to it but not too sure how to implement in the following way:

I need at least 3 threads and need to assign a url to each thread from a list of urls, and then each needs to go and fetch it and parse it before adding contents to a database. [Code] Now the code maynot make sense but what I need to do is add a unique url to each thread to go process.

View 4 Replies

Multithreaded .NET (2010 Express Edition) Program Work Properly?

Sep 11, 2011

I'm trying to make a program of mine into a multithreaded application, but I've hit a pair of snags that I documented in the following code. I can expand this stub into a more efficient version of my existing application.

[Code]...

View 3 Replies

Multithreading Performance - Multithreaded On An Extreme X6800 And A New Lenovo W520

Jul 5, 2011

Id like to say that I have a disk to be searched. The same task was run was multithreaded on an extreme x6800 and a new Lenovo W520.

The filescan on the x6800 dual processor extreme searched 1788 files in 477 seconds. The same search on a new WS520 took 82 seconds to search 2149 files. Multithreading works and the X6800 has an ssd and the lenovo has a standard mechancal disk! The task was diskbound.

View 4 Replies

VS 2005 MultiThreaded Server Socket: From Console To Windows Applications?

Nov 23, 2011

I would like to make a multi-socket TCP server (to accept multiple clients at the same time).I'm working with Visual Studio 2005 Express, maybe that's why files on CodeBank don't work..I found on the web an example about MultiThreaded Server Socket programming, but this is done for "Console application" in this way:

[Code]...

View 7 Replies

Make Multithreaded App Stop At A Certain Point And Wait For The User To Type Something Into A Text Box

Sep 19, 2010

I'm trying to work out how i can make my multithreaded app stop at a certain point and wait for the user to type something into a text box and click ok. It must then carry on and when a different thread gets to that point it stops again and waits for the user to input some text again.

View 1 Replies

Create A Windows Form Application Program That Can Create Games Something Like Gamemaker Or Klik?

Aug 4, 2010

Hello I want to create a windows form application program that can create games something like Gamemaker or Klik & Play (butt less advanced) with D&D "Drag and Drop" events and actions.

View 7 Replies

VS 2008 - Multithreaded Crawler - Each Time A New Thread Accesses One Of The Lists The Content Is Changed

Mar 18, 2010

I have written a multithreaded crawler and the process is simply creating threads and having them access a list of urls to crawl. They then access the urls and parse the html content. All this seems to work fine. Now when I need to write to tables in a database is when I experience issues. I have 2 declared arraylists that will contain the content each thread parse. The first arraylist is simply the rss feed links and the other arraylist contains the different posts. I then use a for each loop to iterate one while sequentially incrementing the other and writing to the database. My problem is that each time a new thread accesses one of the lists the content is changed and this affects the iteration. I tried using nested loops but it did not work before and this works fine using a single thread.

Here is my

SyncLock dlock
For Each rsslink As String In finallinks
postlink = finalposts.Item(i)

[CODE]...

Finallinks and finalposts are the two arraylists. I did not include the rest of the code which shows the threads working but this is the essential part where my error occurs which is basically here postlink = finalposts.Item(i) i = i + 1

ERROR: index was out of range. Must be non-negative and less than the size of the collection. Parameter name:index

I tried copying it to a new list but dosent work.

View 9 Replies

Create A VB Application In VS2008 Without Requiring The Application Be Run On A Computer With A .NET Framework In Place?

Feb 26, 2010

How can I create a VB application in VS2008 without requiring the application be run on a computer with a .NET framework in place?

View 4 Replies

Create Uninstall Command For A Windows-based Application In The Application Folder?

May 27, 2009

how to create a uninstall command for a Windows-based application in the Application Folder when creating a new setup project in visual studio 2008.

View 4 Replies

Create An Application That Captures A Resource From Another Application?

Dec 17, 2009

I understand this is possible but I am not sure where to start. I want to either buy or create an application that captures a resource from another application so that I can fire off another application. In other words, I want to start an application (which I did not write) that is database driven so the form has a number of text boxes. When someone keys something into that field I want to be able to validate the value, outside of the original application. For instance, if the program asks for a zipcode and it doesn't validate the zipcode, I'd like to trap for that and write something that would validate it. At this point I don't think I'd have to send anything back to the textbox/resource.

View 1 Replies

Implementing Multithreaded Crawler Using The Single Thread Crawler Code

Feb 1, 2010

I would like to implement a mulithtreaded crawler using the single thread crawler code I have now. Basically I read the urls from a text file, take each one and crawl and parse it. I know how thread basics of creating a thread and assigning a process to it but not too sure how to implement in the following way: I need at least 3 threads and need to assign a url to each thread from a list of urls, and then each needs to go and fetch it and parse it before adding contents to a database.

[Code]...

View 4 Replies

Info: Multithreaded Server Socket Program Or Client/Server?

Oct 26, 2011

I made a simple TCP server (I've found the example on the web) in VB to receive data from about 40 TCP clients.The clients are not synchronized but sends data about every 18 minutes; the problem is sometimes several clients sends data at the same moment, so I can't receive data.I also made a second program that reads the data (server program writes data on a file, read from the second program) scheduled.

My question is this: I've seen on the web examples about Multithreaded Server Socket Program, so I suppose this could manage my 40 clients (but now the clients are syncronized and send data at the same time in client mode) or is better get data (I have a central client that asks data to all 40 devices in server mode)?

Second question: can I make a single program where I run both TCP client and TCP server at the same time?

View 1 Replies

Create An Application That Can Connect To Others Using That Application?

Oct 29, 2009

I am unsure about how to go at this, what I want is to create an application that can connect to others using that application. Things such as if I change something on the forum it will be changed on someone else who is looking at the forum, granted it would be a specific person who i am connecting with,

View 4 Replies

.NET : Create A Web Application?

Jul 7, 2010

I want to create a web application where I can read and write data into MS SQL data base or an .MDB file (for testing), pls guide me what should be the mean of connectivity to database? ADO /ADODB /OLEDB

View 6 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved