LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-03-2003, 07:58 AM   #1
dummyagain
Member
 
Registered: Sep 2003
Posts: 74

Rep: Reputation: 15
thread


How to write a program that each thread can declare the max no of each resources it needs?

Please show me the pseudocode if possible.. thanks
 
Old 12-03-2003, 09:26 AM   #2
jim mcnamara
Member
 
Registered: May 2002
Posts: 964

Rep: Reputation: 36
ulimit() sets some resource values on a per process basis only. A process is a container for threads, so the threads have to share resources.

Alternatively, you can fork() new processes which can each call ulimit().

What are you trying to do exactly?
 
Old 12-05-2003, 08:35 PM   #3
tszhim
Member
 
Registered: Feb 2003
Posts: 54

Rep: Reputation: 15
in my case, i think using pthread_create, pthread_join...etcis better, but i don't know how to use it....can anyone help?

thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Test thread (Ignore this thread) operatester General 2 07-07-2005 02:04 PM
[thread control suggestion] add a "solved" button that the thread starter can click atom LQ Suggestions & Feedback 3 03-24-2005 11:55 AM
Main thread sending notification to child thread rajesh_b Programming 1 09-22-2004 09:15 AM
'Last Thread' 'Next Thread' for 0 Replies and new posts darin3200 LQ Suggestions & Feedback 2 08-16-2004 01:02 PM
configure qt thread issue (just compiled qt w/ -thread option) cleff Linux - Software 8 05-07-2004 11:11 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration