This is important information because that glue remains even when made into thread. It makes up approximately 10% of the weight of the thread and it should be removed to some degree. When it is removed the silk becomes shiny and softer and somewhat weaker. This is not always desirable. All this shine. It depends how you want to use the silk.
The glue can be removed with an alkali bath or with enzymes that eat up the glue and leave the thread fibers. There are de-gumming solutions on the market. In old days rice straw was burned and used to make an alkali bath. I prefer to only remove part of the glue as I don't want a shiny soft silk thread but a firmer slightly lustrous one. I often get told that , "It doesn't look like silk." There are so many ways to make silk thread and combine and twist these threads that the result is often not a shiny very fine thread and resulting material.
Here is a snapshot of three kinds of thread I made from cocoons. The lightest pink fluffy one is spun silk. I removed 100% of the glue in an alkali bath. After boiling the cocoons for an hour until there is only the fiber left all matted like wool. I remove the chrysalis of the silk moth and then spin the floss like you would cotton or wool. It is soft and light.
The second shiny pink thread has been de-gummed after I reeled it into thread. It is soft and shiny. The darker red color silk has only been de-gummed in boiling water. All three came from the same variety of cocoon and were dyed with madder. Perhaps only one fifth of the amount of glue was removed in the darker red thread, almost all of the glue was removed form the middle one. The only slightly de-gummed green thread below was dyed with gardenia pods and then dipped in the indigo a few times. For me, this kind of understated luster is easier to use.