Click here to Skip to main content
15,893,337 members
Home / Discussions / C#
   

C#

 
AnswerRe: Best way to use Dispose / IDisposable - no unmanaged code Pin
Paul Conrad28-Jul-08 5:37
professionalPaul Conrad28-Jul-08 5:37 
QuestionConnecting to word without ROT. Pin
Green Fuze28-Jul-08 3:54
Green Fuze28-Jul-08 3:54 
AnswerRe: Connecting to word without ROT. Pin
Green Fuze28-Jul-08 5:35
Green Fuze28-Jul-08 5:35 
QuestionLock a file for reading when uploading it to FTP Pin
thoru28-Jul-08 3:31
thoru28-Jul-08 3:31 
AnswerRe: Lock a file for reading when uploading it to FTP Pin
Wendelius28-Jul-08 3:37
mentorWendelius28-Jul-08 3:37 
AnswerRe: Lock a file for reading when uploading it to FTP Pin
Luc Pattyn28-Jul-08 3:45
sitebuilderLuc Pattyn28-Jul-08 3:45 
GeneralRe: Lock a file for reading when uploading it to FTP Pin
thoru28-Jul-08 3:56
thoru28-Jul-08 3:56 
GeneralRe: Lock a file for reading when uploading it to FTP Pin
Luc Pattyn28-Jul-08 4:09
sitebuilderLuc Pattyn28-Jul-08 4:09 
Here are some ways to consider:
1. have the consumer wait for a signal, and once it receives the signal make a list of available files,
then signal back to the producer; in between the consumer should not start creating new files.
2. have the producer use a fake extension, and once the file is uploaded, have it rename the extension;
3. have the producer a file, and once the file is uploaded, have it signal the consumer while
mentioning the file name.

As for signal, you could use anything available, including the creation and deletion of a file
that simply contains a filename.

My favorite would be 3, i.e. producer creates a file say file1.ext1, then it creates file
"currenttime.signal" containing the text "file1.ext1"; consumer would find all signal files,
read them, delete them, and process the file mentioned in them.

And I would use yyyyMMdd_HHmmss format for currenttime, so the signal files have identical alphabetical
and chronological order.

PS: if you are afraid two files need could be generated in the same second, just add a 2-second
delay in the producer code!

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

Voting for dummies? No thanks. Dead | X|


GeneralRe: Lock a file for reading when uploading it to FTP Pin
thoru28-Jul-08 4:16
thoru28-Jul-08 4:16 
GeneralRe: Lock a file for reading when uploading it to FTP Pin
Luc Pattyn28-Jul-08 4:28
sitebuilderLuc Pattyn28-Jul-08 4:28 
QuestionDetermining valid moves for a chess game Pin
Gareth H28-Jul-08 3:00
Gareth H28-Jul-08 3:00 
AnswerRe: Determining valid moves for a chess game Pin
enginço28-Jul-08 3:21
enginço28-Jul-08 3:21 
GeneralRe: Determining valid moves for a chess game Pin
Gareth H28-Jul-08 3:31
Gareth H28-Jul-08 3:31 
AnswerRe: Determining valid moves for a chess game [modified] PinPopular
Luc Pattyn28-Jul-08 4:00
sitebuilderLuc Pattyn28-Jul-08 4:00 
AnswerRe: Determining valid moves for a chess game Pin
GuyThiebaut28-Jul-08 5:11
professionalGuyThiebaut28-Jul-08 5:11 
GeneralRe: Determining valid moves for a chess game Pin
Luc Pattyn28-Jul-08 5:25
sitebuilderLuc Pattyn28-Jul-08 5:25 
GeneralRe: Determining valid moves for a chess game Pin
GuyThiebaut28-Jul-08 5:43
professionalGuyThiebaut28-Jul-08 5:43 
QuestionType comparison syntax Pin
Mycroft Holmes28-Jul-08 2:58
professionalMycroft Holmes28-Jul-08 2:58 
AnswerRe: Type comparison syntax Pin
Gareth H28-Jul-08 3:03
Gareth H28-Jul-08 3:03 
GeneralRe: Type comparison syntax Pin
Mycroft Holmes28-Jul-08 4:13
professionalMycroft Holmes28-Jul-08 4:13 
QuestionScrapping a Datastore Pin
logicon28-Jul-08 2:54
logicon28-Jul-08 2:54 
AnswerRe: Scrapping a Datastore Pin
logicon28-Jul-08 3:26
logicon28-Jul-08 3:26 
Questionold value after validating event of datetimepicker Pin
tabstop28-Jul-08 2:25
tabstop28-Jul-08 2:25 
AnswerRe: old value after validating event of datetimepicker Pin
Kjetil Svendsen28-Jul-08 5:30
Kjetil Svendsen28-Jul-08 5:30 
GeneralRe: old value after validating event of datetimepicker Pin
tabstop28-Jul-08 20:49
tabstop28-Jul-08 20:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.