Sponsored Content
Full Discussion: Multi threading in UNIX
Top Forums UNIX for Beginners Questions & Answers Multi threading in UNIX Post 303038645 by MadeInGermany on Monday 9th of September 2019 03:12:51 PM
Old 09-09-2019
The ls in your script omits the full path.
The following does not:
Code:
for file in $FILE_PATH/* 
do
  $OPT_PATH/load_script "$file" &
done

 

10 More Discussions You Might Find Interesting

1. Programming

Multi threading using posix thread library

hi all, can anyone tell me some good site for the mutithreading tutorials, its application, and some code examples. -sushil (2 Replies)
Discussion started by: shushilmore
2 Replies

2. Programming

Multi-threading questions

I've been doing some reading lately about threading (Posix threads) and I'm really curious about a couple things that I've read. I'm not sure if many people here have threading experience, but I thought it would be nice to be able to discuss some questions about it. (For the record, I did... (1 Reply)
Discussion started by: DreamWarrior
1 Replies

3. Programming

Multi threading using fork

Hi, I have written a code which will run a set of process using fork. I want to know from You how can i start another job when one of my job in my loop is completed My code is #include<stdio.h> #include<ctype.h> main() { int pid,cid; ChildProcess(); ... (1 Reply)
Discussion started by: sureshraju_ma
1 Replies

4. Programming

Regarding Multi-Threading

Hi All, Here's my question I have a 385 MB file containing 5,000,000 records. I need to read from the file and load into a table. Initially i thought of doing it in a single thread (execution of a single program) but when calculated accounted 16 hours of time on a standard benchmark. Hence... (5 Replies)
Discussion started by: matrixmadhan
5 Replies

5. Programming

Multi threading?

I am not sure if multi threading is the correct term, but here is what I am trying to do. I have a while loop that displays the number 1, pauses, displays the number 2, pauses , displays the number 3 ad infinitum. It just keeps counting. While the screen displays the sequence of numbers counting... (4 Replies)
Discussion started by: enuenu
4 Replies

6. Programming

Multi-threading-- calling same function through different threads

Sir, Can I call same function in the start routines of different Threads. I have created two different threads....and wanna call same function from both threads....is it possible??? Also can I fork inside a thread??? (1 Reply)
Discussion started by: arunchaudhary19
1 Replies

7. Programming

Multi-threading

Hi, If we create 10 threads to invoke runQuery method at same time, Will queryProcessor will be overriden sometime or 10 different copies will be created? We are not using any sunchronzation mechnism in runQuery(). so there is not gurantee on QueryProcessor class variables right OR each 10... (1 Reply)
Discussion started by: jramesh1
1 Replies

8. Programming

Multi-threading

In this piece i implemented the gossip method. The first thread is invoked from inside the (msg is first sent from node -1 to 0 from main()) and the other threads are invoked from inside of the thread function itself. I used two mutexes and a condition variable to control the synchronization. ... (4 Replies)
Discussion started by: saman_glorious
4 Replies

9. UNIX for Dummies Questions & Answers

Confusion over Multi Threading

Hi, I am trying to get my head round Multi Threading and I have a few queries to try and clear up my confusion Q1. Is multi threading a hardware / chip level concept, an OS level or an application level concept ? I am trying to work out where SMT architecture fits in. Q2. What's the multi... (3 Replies)
Discussion started by: jimthompson
3 Replies

10. UNIX for Beginners Questions & Answers

Does UNIX support multi-Threading ?

Not just background process running ... but im looking if unix has any multi-threading concept like in Java, C# ... if not present, can you pls share the nearest feature in unix that is close to multi-threaded concept (3 Replies)
Discussion started by: i4ismail
3 Replies
threads(3NCURSES)														 threads(3NCURSES)

NAME
use_screen, use_window - curses thread support SYNOPSIS
#include <curses.h> typedef int (*NCURSES_WINDOW_CB)(WINDOW *, void *); typedef int (*NCURSES_SCREEN_CB)(SCREEN *, void *); int set_escdelay(int size); int set_tabsize(int size); int use_screen(SCREEN *scr, NCURSES_WINDOW_CB func, void *data); int use_window(WINDOW *win, NCURSES_SCREEN_CB func, void *data); DESCRIPTION
This implementation can be configured to provide rudimentary support for multi-threaded applications. This makes a different set of li- braries, e.g., libncursest since the binary interfaces are different. Rather than modify the interfaces to pass a thread specifier to each function, it adds a few functions which can be used in any configura- tion which hide the mutex's needed to prevent concurrent use of the global variables when configured for threading. In addition to forcing access to members of the WINDOW structure to be via functions (see curs_opaque(3x)), it makes functions of the com- mon global variables, e.g., COLORS, COLOR_PAIRS, COLS, ESCDELAY, LINES, TABSIZE curscr, newscr and ttytype. Those variables are maintained as read-only values, stored in the SCREEN structure. Even this is not enough to make a thread-safe application using curses. A multi-threaded application would be expected to have threads up- dating separate windows (within the same device), or updating on separate screens (on different devices). Also, a few of the global vari- ables are considered writable by some applications. The functions described here address these special situations. The ESCDELAY and TABSIZE global variables are modified by some applications. To modify them in any configuration, use the set_escdelay or set_tabsize functions. Other global variables are not modifiable. The use_window and use_screen functions provide coarse granularity mutexes for their respective WINDOW and SCREEN parameters, and call a user-supplied function, passing it a data parameter, and returning the value from the user-supplied function to the application. USAGE All of the ncurses library functions assume that the locale is not altered during operation. In addition, they use data which is main- tained within a hierarchy of scopes. - global data, e.g., used in the low-level terminfo or termcap interfaces. - terminal data, e.g., associated with a call to set_curterm. The terminal data are initialized when screens are created. - screen data, e.g., associated with a call to newterm or initscr. - window data, e.g., associated with a call to newwin or subwin. Windows are associated with screens. Pads are not necessarily associated with a particular screen. Most curses applications operate on one or more windows within a single screen. - reentrant, i.e., it uses only the data passed as parameters. This table lists the scope of data used for each symbol in the ncurses library when it is configured to support threading: RETURN VALUE
These functions all return TRUE or FALSE, except as noted. NOTES
Both a macro and a function are provided for each name. PORTABILITY
These routines are specific to ncurses. They were not supported on Version 7, BSD or System V implementations. It is recommended that any code depending on ncurses extensions be conditioned using NCURSES_VERSION. SEE ALSO
ncurses(3NCURSES), opaque(3NCURSES) threads(3NCURSES)
All times are GMT -4. The time now is 09:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy