Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Nostale
You last visited: Today at 11:11

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Threading

Discussion on Threading within the Nostale forum part of the MMORPGs category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2010
Posts: 514
Received Thanks: 65
Threading

Hi!I have a question for what i need multithreading i developing game server.Soo i know that i need this for connection.
szymek111 is offline  
Old 02/20/2013, 22:18   #2
 
elite*gold: 0
Join Date: Apr 2010
Posts: 2,832
Received Thanks: 4,152
Multithreading - Wikipedia, the free encyclopedia
http://en.wikipedia.org/wiki/Multith...r_architecture)
Elektrochemie is offline  
Old 02/21/2013, 12:41   #3
 
Mr.Zoey's Avatar
 
elite*gold: 0
Join Date: Sep 2012
Posts: 774
Received Thanks: 228
Use this funktion:

Code:
#include <iostream>
#include <process.h>

using namespace std;

void myFunction( void* number){
     
     int myNumber = *(int*)number;

     cout << "Theard Id" << myNumber << "\n";
          
     _endthread();

}

int main(int argc, char *argv[])
{
    int tempNum[10];

    for( int i = 0; i <= 9; i++){
         tempNum[i] = i;
         _beginthread( myFunction, 0, (void*)&tempNum[i]);
    }
    
    system("PAUSE");
    return 0;
}
This Funktion Working !!!
Mr.Zoey is offline  
Old 02/22/2013, 08:08   #4
 
ernilos's Avatar
 
elite*gold: 20
Join Date: Jan 2012
Posts: 766
Received Thanks: 645
Lib: procces.h
Functions: _beginthread(...,...,...) & _endthread()
ernilos is offline  
Reply


Similar Threads Similar Threads
C# Cross Threading
10/13/2012 - .NET Languages - 5 Replies
I was working on Console Applications for a long time and i was able to edit the console from almost everywhere in the project; However, when i migrated to windows forms applications i wondered that i can't edit for example a textBox from any other class because it tells me some error about cross threading So can any one help me ?
C# threading mit Invoke nur wie =)
08/28/2012 - .NET Languages - 10 Replies
hallo com, ich habe vor mein tool was ich geschriben habe in mehreren threads laufen zu lassen. doch dabei stosse ich auf ein problem, ich habe eine if anweisung mit einer checkbox doch dies muss ich über invoke machen. doch ich bekomme es nicht hin. habt ihr mir einen Vorschlag? if (checkBox3.Checked == true) Fehler: Fehler 1 Für das nicht statische Feld, die Methode oder die Eigenschaft "WindowsFormsApplication1.Form1.checkBox3&quo t; ist ein Objektverweis...
C++ Threading
03/24/2012 - CO2 Programming - 13 Replies
Anybody got some good threading tutorials in c++? #Edit Using boost would be fine?
Threading
11/18/2011 - CO2 Private Server - 10 Replies
What should I do? A thread for every map that's used by players, a global thread for all players or a single thread for every player.
[C#] Cross-Threading ?
10/14/2008 - .NET Languages - 7 Replies
Hello, Is there a flag or whatever that lets me use crossthreading freely? Without the help of a Workerthread. Whenever I try to change a variable it doesn't let me because Crossthreading isn't safe (eg. accessing the variables from other threads), but It's also hard to find a solution for this. I'm starting another thread that contains a function to download the source code of another page and process the wanted information into variables, however I cannot do that with a thread. The only...



All times are GMT +1. The time now is 11:12.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.