Author Topic: *** MultiThreading Help  (Read 5133 times)

0 Members and 1 Guest are viewing this topic.

Offline NightLitch

  • Emperor
  • **
  • Posts: 1 455
  • Karma: +16/-0
*** MultiThreading Help
« on: 14 July, 2004, 14:55:14 »
Hey you all expecienced lua scripters/programmers.

Anyone that can help out 2 understand MultiThreading or give me a page about it plz...

/NL
//NL

PtokaX forum

*** MultiThreading Help
« on: 14 July, 2004, 14:55:14 »

Offline plop

  • Forum God
  • ****
  • Posts: 2 464
  • Karma: +37/-0
(No subject)
« Reply #1 on: 14 July, 2004, 17:25:53 »
click

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Offline tezlo

  • Triple Ace
  • **
  • Posts: 225
  • Karma: +1/-0
(No subject)
« Reply #2 on: 14 July, 2004, 17:30:28 »
nothing to do with lua..
basically, multithreading is the ability of an operating system to execute different parts of a program (threads) simultaneously
edit.. lol plop :) indeed you're best off asking google
« Last Edit: 14 July, 2004, 17:31:09 by tezlo »

Offline NotRabidWombat

  • Lord
  • ***
  • Posts: 384
  • Karma: +2/-0


I like childish behavior. Maybe this post will be deleted next.

Offline NightLitch

  • Emperor
  • **
  • Posts: 1 455
  • Karma: +16/-0
(No subject)
« Reply #4 on: 14 July, 2004, 18:11:43 »
Some other than me feels like trying 2 create an exampel for say server/client?

Wombat could you maybe compile the LuaThreads for me plz, maybe that is some simpler than Coroutines maybe... Am stuck where I am now...

trying 2 figuring out how Coroutines works but hard when I don't know what every english word means...

/NL
//NL

Offline NightLitch

  • Emperor
  • **
  • Posts: 1 455
  • Karma: +16/-0
(No subject)
« Reply #5 on: 14 July, 2004, 18:16:26 »
I Just read about LuaThreads AND I must say, that would surely be easier than Coroutines just by looking at it... lol

plz compile it for me, due because I don't now how 2 compile...

/NL
//NL

[NL]Pur

  • Guest
(No subject)
« Reply #6 on: 14 July, 2004, 18:49:05 »
Quote
nothing to do with lua..
basically, multithreading is the ability of an operating system to execute different parts of a program (threads) simultaneously
edit.. lol plop :) indeed you're best off asking google


i always thought multithreading was the ablility of an operating system to execute, different programs at the same time.

Offline NightLitch

  • Emperor
  • **
  • Posts: 1 455
  • Karma: +16/-0
(No subject)
« Reply #7 on: 14 July, 2004, 18:54:49 »
or diff. functions that make the gui or hub frezze...

plzplz compile LuaThreads for me...

/NL
//NL

Herodes

  • Guest
(No subject)
« Reply #8 on: 14 July, 2004, 19:15:31 »
Quote
Originally posted by [NL]Pur
i always thought multithreading was the ablility of an operating system to execute, different programs at the same time.

my brain says 99% chances this is multitasking ... loly :)

Offline kepp

  • Scripter
  • King
  • ******
  • Posts: 790
  • Karma: +2/-0
(No subject)
« Reply #9 on: 14 July, 2004, 19:19:31 »
Actually night, I do not belive you need Coroutines nor MultiT.

A socket shall not freeze an entiry program unless you handle it wrong.
Guarding    

Offline NotRabidWombat

  • Lord
  • ***
  • Posts: 384
  • Karma: +2/-0
(No subject)
« Reply #10 on: 14 July, 2004, 19:39:50 »
"I Just read about LuaThreads AND I must say, that would surely be easier than Coroutines just by looking at it... lol

plz compile it for me, due because I don't now how 2 compile..."

I'm not convinced this will be easier in the long run. When you have real threads you must now be concerned with thread safety. You will have to ensure you so not operate on data that the other thread could be operating on.
I'll see what I can do anyway. In the meantime, coroutines are your best choice.

"Actually night, I do not belive you need Coroutines nor MultiT.

A socket shall not freeze an entiry program unless you handle it wrong."

Socket communication always works best with additional threads because of timeouts and listening.

-NotRabidWombat
« Last Edit: 14 July, 2004, 19:40:12 by NotRabidWombat »


I like childish behavior. Maybe this post will be deleted next.

Offline NightLitch

  • Emperor
  • **
  • Posts: 1 455
  • Karma: +16/-0
(No subject)
« Reply #11 on: 14 July, 2004, 20:10:21 »
Quote
Originally posted by kepp
Actually night, I do not belive you need Coroutines nor MultiT.

A socket shall not freeze an entiry program unless you handle it wrong.

If so, just you try create a simple script trying just 2 get $Lock from ptokax or something... I on the edge on frustration now... heheh...

Quote
Originally posted by NotRabidWombat
I'm not convinced this will be easier in the long run. When you have real threads you must now be concerned with thread safety. You will have to ensure you so not operate on data that the other thread could be operating on.
I'll see what I can do anyway. In the meantime, coroutines are your best choice. "
Ok. Well I hope I can learn something then... Am real stuck...

Without help I don't now what/where 2 begin...

/NL



/NL
//NL

Offline VidFamne

  • Triple Ace
  • **
  • Posts: 173
  • Karma: +2/-0
(No subject)
« Reply #12 on: 15 July, 2004, 02:49:19 »
Talking about threads. Is there anybody who knows
how many threads Ptokax is running?

[NL]Pur

  • Guest
(No subject)
« Reply #13 on: 15 July, 2004, 11:30:58 »
Quote
If so, just you try create a simple script trying just 2 get $Lock from ptokax or something... I on the edge on frustration now... heheh...


you can't get the $Lock thru scripting with ptokax.

Offline NightLitch

  • Emperor
  • **
  • Posts: 1 455
  • Karma: +16/-0
(No subject)
« Reply #14 on: 15 July, 2004, 13:59:46 »
Quote
Originally posted by [NL]Pur
Quote
If so, just you try create a simple script trying just 2 get $Lock from ptokax or something... I on the edge on frustration now... heheh...


you can't get the $Lock thru scripting with ptokax.

ehm... yeah I now that... but this is for my gui so I can connect with it 2 ptokax... =) get it now ?

But I can understand Coroutines...

/NL
//NL

[NL]Pur

  • Guest
(No subject)
« Reply #15 on: 15 July, 2004, 16:03:32 »
well, this the first time you mention it in this thread that you want to create non blocking sockets with lua.

But aren't you going a bit overkill with everything :/

I mean there are easier/better solutions available.

Offline NightLitch

  • Emperor
  • **
  • Posts: 1 455
  • Karma: +16/-0
(No subject)
« Reply #16 on: 15 July, 2004, 20:46:08 »
Quote
Originally posted by [NL]Pur
well, this the first time you mention it in this thread that you want to create non blocking sockets with lua.

But aren't you going a bit overkill with everything :/

I mean there are easier/better solutions available.

Am lua Freaking OUT here... lmao... Gonna try learn some basic C++ or VB where I can create a GUI that can connect as a Client 2 ptokax hub.

I want 2 catch all logs realtime...

/NL
//NL

Offline NotRabidWombat

  • Lord
  • ***
  • Posts: 384
  • Karma: +2/-0
(No subject)
« Reply #17 on: 15 July, 2004, 21:40:41 »
"Talking about threads. Is there anybody who knows
how many threads Ptokax is running?"

TestDrive 4 - Three.

-NotRabidWombat


I like childish behavior. Maybe this post will be deleted next.

Offline Corayzon

  • Lord
  • ***
  • Posts: 464
  • Karma: +1/-0
(No subject)
« Reply #18 on: 16 July, 2004, 08:03:43 »
yo night,

what exactly do you need help with?

cause you talk about program threading help and then you say your tring to write a protax hub client to connect to your hubscript?

how do these relate?

i fink if ya clearly state what u need to accomplish then maybe ppl can help alot quicker, rather then just asking for help on what you think might be the solution to your problem.

if ya need some help with vb or c# socket programing i would be glade to help ya out. i would have now, but i dont seem to see what ur asking on help with

me shutup now  :rolleyes:

noza

Offline NightLitch

  • Emperor
  • **
  • Posts: 1 455
  • Karma: +16/-0
(No subject)
« Reply #19 on: 16 July, 2004, 12:52:54 »
Well for the moment I have created my Own GUI in WxLua work great no bugs nothing.

My next movement I though would be if I could make the Gui connect 2 ptokax so I can have it on there and gather online information, such as: Realtime UserInfo database to look in, in Gui.

2 My problem/help then, I want 2 be able 2 connect 2 ptokax in some with my gui mostly then, I've read that you can implent C code into lua but I don't know how that works, though if I could get help with the socket and datareturning then Am happy...

But I don't now how to do it, anf it feels like wasted time for the moment trying 2 learn C++ or VB.

All help and solusions are welcome.

/NL
//NL

Offline Corayzon

  • Lord
  • ***
  • Posts: 464
  • Karma: +1/-0
(No subject)
« Reply #20 on: 22 July, 2004, 03:22:24 »
yo NightLitch,

i see. This could be done like so...

u can have a administration bot that connects to your hub the same way you would. and have extra protocol added to handle administrating the hub.

one thing that might help ya is my appserver mainframe. Its writin in vb and contains the p2p protocol handlers (lock to key and so on) and has side scripts implemented for various winstock functions.

another way would to be simply write a admin mode for your bot in ptokax. ie, type +admin and have ur bot open admin mode to your user.

hope this gives ya some ideas NightLitch

noza

PtokaX forum

(No subject)
« Reply #20 on: 22 July, 2004, 03:22:24 »