Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #1479 (new enhancement)

Opened 15 years ago

Last modified 14 years ago

Windows service support

Reported by: sleets Assigned to: kris
Priority: major Milestone: 2.0
Component: Tango Version: 0.99.7 Dominik
Keywords: Cc:

Description

I write a windows service, when it run mayby need Create some Thread in a Thread that create by system. how to GC the thread when i pause the service?

there is add a new system handle after each pause & continue service.

Attachments

test.rar (55.8 kB) - added by sleets on 02/16/09 04:30:35.
service source & execute file.

Change History

02/16/09 04:30:35 changed by sleets

  • attachment test.rar added.

service source & execute file.

02/16/09 08:26:32 changed by larsivi

Is this an issue, or just a question on how to do things? The report certainly lacks what is needed to make it a proper failure report or enhancement request.

02/16/09 12:19:51 changed by sleets

  • status changed from new to closed.
  • resolution set to invalid.

the ServiceMain? is write by D but be called in system thread, in ServiceMain? need start a tango Thread B, but the Thread B is not CloseHandle?( m_hndl ).

now I call Thread B.join CloseHandle? the m_hndl.

sorry for my poor english.

02/16/09 13:13:36 changed by sleets

  • status changed from closed to reopened.
  • type changed from defect to enhancement.
  • resolution deleted.

I am not sure the GC is work fine in windows service. the memory used can't to cut down after pause service.

tango should have an Windows service template.

02/16/09 15:52:10 changed by torhu

I'm not sure exactly what you are asking for, but have you looked at the thread_attachThis() function in tango.core.Thread?

02/16/09 16:37:57 changed by larsivi

  • summary changed from How to use GC free Thread handle in native Thread? to Windows service support.

are there any specific requirements for a program that should be registered as a windows service? Especially if it is written entirely in D?

Also, if the program is a deamon/service, and written entirely in D, then the deamon functionality of Thread may be of interest.

02/16/09 17:30:05 changed by sleets

I am a newbie in programing and english. I want write a httpd use d.

I want to tango to provide a windows Service Module or Examples.

Is thread_attachThis can be used in Windows System Thread? I think the some thread is be called in Windows System Thread, maybe i am wrong.

I will try Thread.isDaemon , But I do not understand the relationship between it and Windows Service.

03/29/09 13:30:56 changed by larsivi

  • milestone changed from 0.99.8 to 0.99.9.

11/09/09 09:20:10 changed by kris

  • owner changed from kris to fawzi.
  • status changed from reopened to new.

Sleets: I don't know of anyone who has written a Win-Service in D yet, so don't know the answer. Perhaps fawzi has some ideas

11/29/09 12:18:32 changed by fawzi

  • owner changed from fawzi to kris.

12/04/09 21:22:40 changed by kris

  • milestone changed from 0.99.9 to 2.0.