How do i clean up threads?

i have a socket server that creates a lot of socket
with thread. some connection can be disconnected and so the it's socket will be closed. but what happens to the thread?? GC will collect unreferenced object..
does that apply to thread also?
after thread IS object, right?. but it comes to me as
process, child process and thread stuff.
can somebody confirm this?

You can write a small program that creates unreferenced Threads i.e.
(new ThreadName()).start();(or something similar) and print to Std.out when a thread is destroyed/finished to confirm this. If your Threads are in an infinite loop this will definitely confirm it or not.

Similar Messages

  • How can I clean up queue one-time on Sun Java system messaging 6.3

    Hi,
    <address>Our Email server have a problem, When I run _./imsimta qm directory tcp_local_, There are about 5 Millions of messages in the queue.</address>
    Now our Email server send messages very slowly, how can I clean up queue one-time?
    the command _./imsimta qclean_ is very slowly.
    What can I do to prevent this problem?
    our Email server version is :
    Sun Java(tm) System Messaging Server 6.3-6.03 (built Mar 14 2008; 32bit)
    libimta.so 6.3-6.03 (built 17:12:37, Mar 14 2008; 32bit)
    SunOS email-1 5.10 Generic_120011-14 sun4u sparc SUNW,Sun-Fire-V890
    Thank you !

    If you have more than 100,000 messages in the queue, then look at the MAX_MESSAGES parameter in [the job_controller.cnf file|http://wikis.sun.com/display/CommSuite/Job+Controller+Configuration+File]. If the parameter is not specified, it defaults to 100000. If you have more than that number of messages in the channel queues, it will take a long time for new/legitimate messages to be sent because job_controller is only considering the first 100,000 messages in the queue.
    If you get into the "imsimta qm" command do do "sum -database", it will show a summary of what job_controller has in its internal cache and therefore what job_controller is working on. If you compare that to "sum -directory" you will probably see a difference.
    If these are all legitimate messages, you need to increase MAX_MESSAGES, cnbuild, and restart job_controller.
    If they are not, then preventing this in the future will require determining how they got into your queue and correcting that.
    As for removing them, the "imsimta qm" commands allow you to select messages by various criteria and then you can "return" or "delete" them. But yes, that will take a long time if there are many messages because it is a single threaded process and it needs to open and examine each message. You may be able to accomplish the task more quickly with a shell script that works on individual channel queue subdirectories and then run multiple copies of that script in parallel. After you have cleaned out the queue, restart job_controller.
    Also, you might want to consider [the subdirs channel keyword|http://msg.wikidoc.info/index.php/Subdirs_and_nosubdirs_Channel_Options].

  • How can I clean all the junk files from my iMac so that it can run faster?

    How can I clean all the junk files from my iMac so that it can run faster? Its been slowing down ever since I started using it.

    Before doing anything, we might be able to help with your iMac issues here.
    Please download, install and run Etrecheck.
    http://www.etresoft.com/etrecheck
    Copy/paste its report here in another reply thread so that we have a complete profile of your Mac's hardware and installed software.

  • My Mac Book Pro says it has been infected with viruses. How do I clean them up?

    My Macbook Pro says it has been infected with viruses. How do I clean it up?

    There are different variants of names for this malware but the steps of removal should be the same unless it has advanced.
    http://www.securemac.com/MAC-Defender-Rouge-Anti-Virus-Analysis-Removal.php
    https://discussions.apple.com/thread/3032201?start=0&tstart=0
    https://discussions.apple.com/thread/3042885?start=0&tstart=0
    http://www.reedcorner.net/news.php/news.php?s=macdefender

  • Expiration and Clean up thread - MDM connector - Visual administrator

    Hi Experts!
    I  need some suggestion from the Visual administrator - MDM connector.
    We have the default setting for maximum connections, clean up thread time and the expiration set.
    As of now, clean up thread value is 300 seconds. and Expiration value is set too. But we could see, as the days goes, the number of connections in the 'UsedManagedSessionsCount' is increasing. I feel the expiration is not working.
    Could you kindly suggest, how to ensure the expiration and clean up thread is working?
    Thanks,
    SK

    Hello,
    1) Connections are used quite a long time (this depends on how
    applications using the datasource is implemented, or how long it keeps
    the connections referenced). In this case the solution will be to:
      1.1) Increase the pool size: Maximum Connections Number. The optimal
    value for this as a rule of thumb is: the max connections with which the
    backend (Database) performs best divided to number of servers in the
    cluster.
      1.2) Increase the Maximum time to wait for connection - so the
    resource system of J2EE Engine will wait for freed connection longer
    before throwing the exception. However, from end user viepoint, this
    will lower the performance. But it's better than failure.
      1.3) Enable expiration - set Connection Lifetime to 300 (5 minutes) -
    this means that after it is returned to the pool if not referred again
    within 5 minutes it is destroyed. Also set the automatic cleanup thread
    interval to 180 (3 minutes) - each 3 minutes a thread will be run to
    detect idle connections.
    regards,
    John Feely

  • How Can I Clean Memory, Cache...An​d Boost Memory On Playbook (like clean & boost memory on Blackberry phone)?

    Dear bros, I have a question which I concern about: How Can I Clean Memory, Cache...And Boost Memory On Playbook (like clean & boost memory on Blackberry phone)? I want to to this because I want my playbook run smoothly.
    Thanks all.

    The PlayBook manages memory through the OS, there's no 'memory cleaner' like on the BlackBerry phones.
    In the browser, there are settings to clear cache, cookies and history which do improve the browser performance.
    You may want to try and change the PlayBook multitasking mode. Go into Settings - General and change 'Application Behaviour'. Showcase is full multitasking (slower), Paused pauses all programs when minimised and makes the PlayBook save battery and run a little faster.
    Hope that helps.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!

  • How often physically clean my macbook pro?

    How often physically clean my macbook?.

    When cleaning the keyboard and trackpad, be VERY CAREFUL not to get any fluid under the keys or around the edge of the trackpad. It will be impossible to remove and over time can lead to serious corrosion issues, like those in these photos (double-click on the image for an up-close-and-gory look at the damage): https://discussions.apple.com/thread/3875300
    Alternately, you can try and keep dirt away from the Mac by using protective shells and keyboard covers. I use a hard transparent shell from Speck that has saved the aluminum on the lid from several nasty scratches already. Some people prefer their black matte shells, which feature a grippy non-slip rubberized finish.

  • TS4009 How do I clean up mail in my icloud?  I have already deleted old mail on all devices, and emptied the junk & deleted files, but it still shows that I am at max on my icloud. What do I do to free up space? (photos & apps do not take up that much roo

    How do I clean up mail in my icloud?  I have already deleted old mail (from all my e-mail accounts) on all devices, and emptied the junk & deleted files, but it still shows that I am at max on my icloud. What do I do to free up space? (photos & apps do not take up that much room).  When I go to manage storage on any device & it will display how much room each program or app is using, it still shows that my e-mail is taking up the most room.  Is there a way to actually log on to the icloud server to manage what it stored there?  If so, how do I do it?  Also, on a related subject,  why does my mail not sync accross all devices?   ie. when I delete an email on one device, why do I still see it on all my other devices?  How can I change this?
    I have an iphone5, ipad2, ipod 4th gen, ipod 3rd gen, all running on my same apple id - but I have a PC not a Mac home computer - is this part of the problem?  Looking to upgrade to a Mac sometime this year...
    Thank-you for the help!

    beckyfromoz wrote:
    I do have the Time Capsule and spoke to Apple Care here in Sydney about it yesterday.  They told me my mail is not backed up there unless I create a special folder. I just tried ringing them again but Apple Care is closed today...
    Mail is backed up automatically. If you make backups automatically, open Mail application and then, open the Time Machine app (in /Applications/Utilities). You will access to the Time Machine interface, and you will be able to see all your mails of all the backups you have, and you will be able to restore them. It means that your mails are backed up onto the Time Capsule

  • How do I clean the fans on my 2011 macbook pro 13inch

    I have a early 2011 macbook pro 13 inch. It travels with me every where I go. I have had the computer almost three months now and have not had a problem with it.  Some how, debris got in to the fans. I am thinking it some how got sucked in to one of the intake vents. I hear it  (not often) ratteling when I move the computer or tilt it ECT.  It sounds like somthing is blowing around in the fan.  It is a scarry sound.  At first I thought it was the hard disk.   I know it is not the hard disk because I was listening to the computer  when it was making the sound and it is comming from the back end of the computer, nowhere near where hard disk is located. My question is, How do I clean/ remove the debris? should I be concernd?  other than that the computer runs normaly

    Personally, I wouldn't touch them directly.  Use a vaccum (don't use one of those compressed air cans) to vacuum out all the stuff/dust/hair/etc.  Do not try to remove them.  Do not try to shove a stick or something in it.

  • My mac is running extremely slow lately how can i clean it

    my mac is too slow lately how can i clean it

    Yes. But what ever you do, don't buy any of the so called "cleanup" software. It is all worthless crapware.
    Try http://www.thexlab.com/faqs/freeingspace.html
    or http://www.thexlab.com/faqs/performance.html

  • I have duplicative song files in my library that are grayed out.  This seems to cause a syncing problem to my ipod or iphone.  How can I clean up this mess?

    I chose to let iTunes rearrange my files and it appears to have duplicated them in my computer's drive.  So now I have the same folders/files directly under my D drive (second computer hard drive) and also in the iTunes Music Folder that iTunes created.  Wasn't sure what to do so I did another import and now I have files in my library that are grayed out with the small i symbol in the circle next to them.  I also have the working (bolded) files too.  How can I clean this up?

    Musicman05 wrote:
    Is there a way to override the 256kbps "conversion" when uploading to iCloud? 
    No. All music that is mirrored in the cloud will be AAC@256 Kbps.
    Musicman05 wrote:
    Along the same lines, if I "download" a song from my library to my iPhone, then plug my iPhone into my computer and sync the song file from my computer, will the higher quality original file overwrite the 256 one? 
    No, because with iTunes Match enabled on an iOS device traditional syncing of music via USB is disabled. All music management is done directly on the device.
    Musicman05 wrote:
    Also, if I want to syncronize another computer using iTunes match, how can I get the higher quality audio files?  Will I simply have to transport all of them by an exernal hard drive or thumb drive?
    You will first have to copy the high-quality audio files to the computer, add them to the iTunes library then enable iTunes Match.

  • How can I clean my Mac Book Pro completely to hand it over to an other user ?

    How can I clean my Mac Book Pro completely to hand it over to an other user ?

    Follow these directions:
    http://www.thesafemac.com/how-to-prepare-your-mac-for-sale/
    Ciao,

  • How do I fully cancel a synchronization with flickr? How do I clean up my get my Aperture library to accurately reflect what's on Flickr?

    I went to add one photo to my Flickr site yesterday and I must have had the whole project selected because it started to upload all 635 photos in the project. I realized this about an hour later when I came back and I managed to pause the synchronization, but I can't seem to cancel it. Clicking on Cancel Task doesn't do anything.
    I need to cancel the rest of the synchronization, and then what I would like to do is somehow make sure that what I've chosen to be in my Flickr account is what Aperture thinks should be in Flickr account.
    I went into my Flickr account and deleted all of the ones I didn't want. I ended up keeping more than the one I intended to upload, but I sure didn't want all of them. So, right now, the Flickr account is correct, but my Aperture Flickr library is probably all screwed up. How do I clean up my Aperture library to accurately reflect what's in Flickr?
    Before I just upgraded to the latest version (after upgrading to Mountain Lion) when I tried to synch to the main Flickr set I've been working in, I got a message saying that Aperture could only add the first 500 photos (I only had about 110 photos in the set), so I'm wondering if I had already somehow accidentally added everything at that point, but it wouldn't do it, then I upgraded and now it's trying to synch everything.
    OS: Mountain Lion
    Aperture: 3.3.2
    Thanks.

    I went to add one photo to my Flickr site yesterday and I must have had the whole project selected because it started to upload all 635 photos in the project. I realized this about an hour later when I came back and I managed to pause the synchronization, but I can't seem to cancel it. Clicking on Cancel Task doesn't do anything.
    I need to cancel the rest of the synchronization, and then what I would like to do is somehow make sure that what I've chosen to be in my Flickr account is what Aperture thinks should be in Flickr account.
    I went into my Flickr account and deleted all of the ones I didn't want. I ended up keeping more than the one I intended to upload, but I sure didn't want all of them. So, right now, the Flickr account is correct, but my Aperture Flickr library is probably all screwed up. How do I clean up my Aperture library to accurately reflect what's in Flickr?
    Before I just upgraded to the latest version (after upgrading to Mountain Lion) when I tried to synch to the main Flickr set I've been working in, I got a message saying that Aperture could only add the first 500 photos (I only had about 110 photos in the set), so I'm wondering if I had already somehow accidentally added everything at that point, but it wouldn't do it, then I upgraded and now it's trying to synch everything.
    OS: Mountain Lion
    Aperture: 3.3.2
    Thanks.

  • With journaling, I have found that my computer is saving a large amount of data, logs of all the changes I make to files; how can I clean up these logs?

    With journaling, I have found that my computer is saving a large amount of data, logs of all the changes I make to files; how can I clean up these logs?
    For example, in Notes, I have written three notes; however if I click on 'All On My Mac' on the side bar, I see about 10 different versions of each note I make, it saves a version every time I add or delete a sentence.
    I also noticed, that when I write an email, Mail saves about 10 or more draft versions before the final is sent.
    I understand that all this journaling provides a level of security, and prevents data lost; but I was wondering, is there a function to clean up journal logs once in a while?
    Thanks
    Roz

    Are you using Microsoft word?  Microsoft thinks the users are idiots. They put up a lot of pointless messages that annoy & worry users.  I have seen this message from Microsoft word.  It's annoying.
    As BDaqua points out...
    When you copy information via edit > copy,  command + c, edit > cut, or command +x, you place the information on the clipboard. When you paste information, edit > paste or command + v, you copy information from the clipboard to your data file.
    If you edit > cut or command + x and you do not paste the information and you quite Word, you could be loosing information.  Microsoft is very worried about this. When you quite Word, Microsoft checks if there is information on the clipboard & if so, Microsoft puts out this message.
    You should be saving your work more than once a day. I'd save every 5 minutes.  command + s does a save.
    Robert

  • How do i clean spots on monitor of macbook pro with retina display?

    how do i clean spots on monitor of macbook pro with retina display?

    Light alcohol cleaners, like what you use for camers lenses, works.  Just do not have the soft cloth cleaning pad dripping wet ... dripping wet will allow fluid to get onto internal components.

Maybe you are looking for

  • How can you set up ECCN in Material Master if not using Foreign Trade

    After many years, we now have the need to store ECCN codes on our Material Masters.  Although I see on the Foreign Trade view of the Material Master under Legal Control what appears to be a way to set this up, the fields are grayed out and do not see

  • Problems using Myfaces1.1 - can't find tld files

    I have used Nitrox 2.1 with Myfaces 1.0 - everything was fine, but now we're changing to Myfaces1.1. All I do is changing the old myfaces.jar with the newer myfaces-all.jar (ver 1.1.1). The problem is that Nitrox IDE doesn't seem to recognize the tld

  • IPad mini 2 vs iPad mini

    How do I tell the difference between iPad mini and iPad mini 2?  I just bought a iPad mini 2, but it doesn't say iPad mini 2 anywhere except the receipt.  Am I missing something?  Thank you in advance.

  • V 12 Firfox creates 1,000nds of .TMF in temp folder never deletes them

    Using V12 Firefox with MS windows 2000 Pro Unknown to me is Firefox makes as many as 2 .TMF ( not .tmP) per minute and only a check of hard drive found over 15,000 .TMFs in a temp directory sucking up over 900 MEG bytes of hard drive ! Shutdown of la

  • How do I replace former owner's name in all iMac directories?

    How do I replace former owner's name in all iMac directories? Including network setup and Office file management. I have already renamed the computer and deleted former owner when and where possible. (I also have an iPad and hope I was directed to th